public static void appendTo ( Formatter formatter , int width , int precision , boolean leftJustified , String out ) { try { Appendable appendable = formatter . out ( ) ; if ( precision > - 1 && out . length ( ) > precision ) { appendable . append ( Helpers . truncate ( out , precision ) ) ; return ; } if ( leftJustified ) appendable . append ( Helpers . rightPad ( out , width ) ) ; else appendable . append ( Helpers . leftPad ( out , width ) ) ; } catch ( IOException e ) { throw new AssertionError ( e ) ; } }
Can be used to append a String to a formatter .