Android examples for java.lang:String Pad
String right Pad
public class Main{ public static String rightPad(String str, int count, char c) { char[] pad = new char[count]; for (int i = 0; i < count; i++) { pad[i] = c;//from ww w .j a v a2s .c o m } return str.concat(new String(pad)); } }