public static String withFirst(String input,Function<Character,String> callback){
  if (input == null) {
    return null;
  }
 else   if (input.length() == 0) {
    return "";
  }
 else {
    return String.join("",callback.apply(input.charAt(0)),input.subSequence(1,input.length()));
  }
}

public static String withFirst ( String input , Function < Character , String > callback ) { if ( input == null ) { return null ; } else if ( input . length ( ) == 0 ) { return "" ; } else { return String . join ( "" , callback . apply ( input . charAt ( 0 ) ) , input . subSequence ( 1 , input . length ( ) ) ) ; } }
does something with the first character in the specified string .
