public static String padLeft ( String s , int desiredLength , String padString ) { while ( s . length ( ) < desiredLength ) { s = padString + s ; } return s ; }
Pad the given string with padString on the left up to the given length .