public static String buildString(Consumer<StringPrinter> printer){
  StringBuilder builder=new StringBuilder();
  printer.accept(new StringPrinter(null));
  return builder.toString();
}

public static String buildString ( Consumer < StringPrinter > printer ) { StringBuilder builder = new StringBuilder ( ) ; printer . accept ( new StringPrinter ( null ) ) ; return builder . toString ( ) ; }
easy way to create a string using a stringprinter .
