/** * Return a string padded with the given string for the given count. * * @param string Pad element. * @param count Pad count. * @return Padded string. */ public static String pad(final String string, final int count) { return pad(new StringBuffer(), string, count); }
/** * Return a string padded with the given string value of an object * for the given count. * * @param obj Object to convert to a string. * @param count Pad count. * @return Padded string. */ public static String pad(final Object obj, final int count) { return pad(new StringBuffer(), String.valueOf(obj), count); }
out.print(Strings.pad(" ", maxNameLength - name.length())); out.print(" ");