static String capitalize ( String string ) { if ( isBlank ( string ) ) { return "" ; } char first = string . charAt ( 0 ) ; if ( Character . isUpperCase ( first ) ) { return string ; } else { return Character . toUpperCase ( first ) + string . substring ( 1 ) ; } }
Capitalizes the first letter of the string passed in