/** * Create a new string by padding the existing one with blanks to specified width. * Do nothing if length is already greater or equal to width. * * @param s string to pad * @param width length of return string * @return padded string */ public static String s(String s, int width) { return pad(s, width, false); }
/** * Create a new string by padding the existing one with blanks to specified width. * Do nothing if length is already greater or equal to width. * * @param s string to pad * @param width length of return string * @return padded string */ public static String s(String s, int width) { return pad(s, width, false); }
/** * Create a new string by padding the existing one with blanks to specified width. * Do nothing if length is already greater or equal to width. * * @param s string to pad * @param width length of return string * @return padded string */ public static String s(String s, int width) { return pad(s, width, false); }
/** * Create a new string by padding the existing one with blanks to specified width. * Do nothing if length is already greater or equal to width. * * @param s string to pad * @param width length of return string * @return padded string */ public static String s(String s, int width) { return pad(s, width, false); }
/** * Format an integer value. * @param v : value * @param width pad to this width * @return formatted string */ public static String i(int v, int width) { return pad(Integer.toString(v), width, true); }
/** * Format an integer value. * * @param v : value * @param width pad to this width * @return formatted string */ public static String i(int v, int width) { return pad(Integer.toString(v), width, true); }
/** * Format a long value. * @param v : value * @param width pad to this width * @return formatted string */ public static String l(long v, int width) { return pad(Long.toString(v), width, true); }
/** * Format an integer value. * * @param v : value * @param width pad to this width * @return formatted string */ public static String i(int v, int width) { return pad(Integer.toString(v), width, true); }
/** * Format an integer value. * * @param v : value * @param width pad to this width * @return formatted string */ public static String i(int v, int width) { return pad(Integer.toString(v), width, true); }
/** * Format a long value. * * @param v : value * @param width pad to this width * @return formatted string */ public static String l(long v, int width) { return pad(Long.toString(v), width, true); }
/** * Format a long value. * * @param v : value * @param width pad to this width * @return formatted string */ public static String l(long v, int width) { return pad(Long.toString(v), width, true); }
/** * Format a long value. * * @param v : value * @param width pad to this width * @return formatted string */ public static String l(long v, int width) { return pad(Long.toString(v), width, true); }
/** * Double value formatting with minimum number of significant figures in a specified width. * This will try to do a reasonable job of getting * a representation that has min_sigfig significant figures in the specified width. * Right now, all it does is call d( double d, int min_sigfig) and left pad out to width chars. * * @param d the number to format. * @param min_sigfig minimum number of significant figures * @param width width of the result * @return string representation, right justified in field of specified width */ public static String d(double d, int min_sigfig, int width) { String s = Format.d(d, min_sigfig); return pad(s, width, true); }
/** * Double value formatting with minimum number of significant figures in a specified width. * This will try to do a reasonable job of getting * a representation that has min_sigfig significant figures in the specified width. * Right now, all it does is call d( double d, int min_sigfig) and left pad out to width chars. * * @param d the number to format. * @param min_sigfig minimum number of significant figures * @param width width of the result * @return string representation, right justified in field of specified width */ public static String d(double d, int min_sigfig, int width) { String s = Format.d(d, min_sigfig); return pad(s, width, true); }
/** * Double value formatting with minimum number of significant figures in a specified width. * This will try to do a reasonable job of getting * a representation that has min_sigfig significant figures in the specified width. * Right now, all it does is call d( double d, int min_sigfig) and left pad out to width chars. * * @param d the number to format. * @param min_sigfig minimum number of significant figures * @param width width of the result * @return string representation, right justified in field of specified width */ public static String d(double d, int min_sigfig, int width) { String s = Format.d(d, min_sigfig); return pad(s, width, true); }
/** * Double value formatting with minimum number of significant figures in a specified width. * This will try to do a reasonable job of getting * a representation that has min_sigfig significant figures in the specified width. * Right now, all it does is call d( double d, int min_sigfig) and left pad out to width chars. * * @param d the number to format. * @param min_sigfig minimum number of significant figures * @param width width of the result * @return string representation, right justified in field of specified width */ public static String d(double d, int min_sigfig, int width) { String s = Format.d(d, min_sigfig); return pad(s, width, true); }