question: protected static String h2c ( String hyphenated , boolean studly ) { StringBuilder b = new StringBuilder ( hyphenated . length ( ) ) ; boolean capNext = studly ; for ( int i = 0 ; i < hyphenated . length ( ) ; ++ i ) { char c = hyphenated . charAt ( i ) ; if ( c == '-' ) capNext = true ; else { b . append ( capNext ? Character . toUpperCase ( c ) : c ) ; capNext = false ; } } return b . toString ( ) ; }
target:  convert hyphenated to StudlyCaps or camelCase