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
The Guava Library has Strings.padStart that does exactly what you want, along with many other useful utilities.