26.03.2011, 15:44
Possible, but it will look ugly with some texts. example:
T h i s i s the first line
This is the second line
But in general it's easy to make - Get the longest line, and then in a while loop adding a spaces in lines until it's the same length.
too lazy to make a proper code.
T h i s i s the first line
This is the second line
But in general it's easy to make - Get the longest line, and then in a while loop adding a spaces in lines until it's the same length.
Код:
for(1...line amount) if(strlen(line(i)) > strlen(longestline)) longestline = line; for(1..line amount) while(strlen(line(i) >= strlen(longestline)) add spaces using variable