question: public static String toTitleCase ( String input ) { StringBuilder titleCase = new StringBuilder ( ) ; boolean nextTitleCase = true ; for ( char c : input . toCharArray ( ) ) { if ( Character . isSpaceChar ( c ) ) { nextTitleCase = true ; } else if ( nextTitleCase ) { c = Character . toTitleCase ( c ) ; nextTitleCase = false ; } titleCase . append ( c ) ; } return titleCase . toString ( ) ; }
target:  Convert string to title case