public static String pad (String value, int width, char c)
    {
        // sanity check
        if (width <= 0) {
            throw new IllegalArgumentException("Pad width must be greater than zero.");
        }
        int l = value.length();
        return (l >= width) ? value
                            : value + fill(c, width - l);
    }
public static String pad ( String value , int width , char c ) { if ( width <= 0 ) { throw new IllegalArgumentException ( "Pad width must be greater than zero." ) ; } int l = value . length ( ) ; return ( l >= width ) ? value : value + fill ( c , width - l ) ; }
Pads the supplied string to the requested string width by appending the specified character
to the end of the returned string.
If the original string is wider than the requested width, it is returned unmodified.