public static String capitalizeWord ( String s ) { // validate if ( ( s == null ) || ( s . length ( ) == 0 ) ) { return s ; } return s . substring ( 0 , 1 ) . toUpperCase ( ) + s . substring ( 1 ) . toLowerCase ( ) ; }
Capitalises the first letter of a given string .