I am trying to format strings by whitespaces. All strings normally look like
01. Anton 30p
02. Cinderella 20p
03. Thomas 18p
04. Anastacia-Laura 16p
I want to format each string, that the points start at the same column. There I wrote:
s = stringUpToName;
int addSpacing = 37 - s.Length;
for (int i = 0; i < addSpacing; i += 1) s += " ";
s += points;
It gets closer this way, but it's still not perfectly formatted.
I want it to look like this:
01. Anton 30p
02. Cinderella 20p
03. Thomas 18p
04. Anastacia-Laura 16p