public static String rjust(String str,int columnWidth){
  return String.format("%" + columnWidth + "s",str);
}

public static String rjust ( String str , int columnWidth ) { return String . format ( "%" + columnWidth + "s" , str ) ; }
this should not be in this class , move to a dedicated ascii - art class when appropriate . < p > use this to standardize the width of some text output to all be right - justified and space - padded on the left side to fill up the given column width .
