Probably there is already some kind of apache or guava utility class for my requirement:
I want to always create strings of the same length. The missing characters should be filled either left or right with a fixed character. Something like:
Utils.filledString(teststring, " ", 5); //would ensure the teststring is always 5 chars long, and if not append whitespace to the right
Utils.filledString(teststring, "x", -5); //same as above, but fill the 5 chars left with an x
You get the idea, and probably it's already there, but I'm missing the right keyword to find it.