Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
public static String lpad(String s, int n, String replace) {
while (s.length() < n) {
s = replace+s;
}
return s;
}
public static String rpad(String s, int n, String replace) {
while (s.length() < n) {
s = s+replace;
}
return s;
}