I need to produce fixed length string to generate a character position based file. The missing characters must be filled with space character.
As an example, the fi
You can also write a simple method like below
public static String padString(String str, int leng) { for (int i = str.length(); i <= leng; i++) str += " "; return str; }