public static String underlineToCamel ( String param ) { if ( isEmpty ( param . trim ( ) ) ) { return "" ; } StringBuilder sb = new StringBuilder ( param ) ; Matcher mc = Pattern . compile ( UNDERLINE ) . matcher ( param ) ; int i = 0 ; while ( mc . find ( ) ) { int position = mc . end ( ) - ( i ++ ) ; sb . replace ( position - 1 , position + 1 , sb . substring ( position , position + 1 ) . toUpperCase ( ) ) ; } return sb . toString ( ) ; }
convert underline style string to camel style .