public static String upperFirst ( String input ) { if ( input == null ) { throw new IllegalArgumentException ( "input can't be null" ) ; } return head ( input ) . map ( String :: toUpperCase ) . map ( h -> tail ( input ) . map ( t -> h + t ) . orElse ( h ) ) . get ( ) ; }
Converts the first character of string to upper case .