code: public static String buildString(Consumer<StringPrinter> printer) {
  		StringBuilder builder = new StringBuilder();
  		printer.accept(new StringPrinter(builder::append));
  		return builder.toString();
  	}
docs: Easy way to create a String using a StringPrinter.