R
Robert Crandal
Suppose I have the following string:
s = "iPhone" ' string length is 6
I want to modify the above string variable such that
the string length is 20, AND, the string is centered or
padded with spaces.
The result should look like:
s = " iPhone " ' string length is 20
Does that make sense? I just want to transform a
string variable so it is padded with space characters
and it appears (somewhat) centered. I prefer
a general solution for situations where I want to
center the string within a string length of N characters.
Thanks!
s = "iPhone" ' string length is 6
I want to modify the above string variable such that
the string length is 20, AND, the string is centered or
padded with spaces.
The result should look like:
s = " iPhone " ' string length is 20
Does that make sense? I just want to transform a
string variable so it is padded with space characters
and it appears (somewhat) centered. I prefer
a general solution for situations where I want to
center the string within a string length of N characters.
Thanks!