Right justify a string
"Claus Busch" wrote Hi Robert,
s1 = " "
s2 = "13"
s3 = Left(s1, 2) & s2
Hi Claus.... This solution ALMOST worked.
Here's another example:
s1 = "--------" ' 8 dash characters
s2 = "13"
After applying your functions, the result of s3
shoud be:
s3 = "------13" ' 6 dashes + '13' string
Basically, the final length of s3 should be the
same as the length of s1. Also, I need to
cut out the rightmost characters of s1, just to
make room for s2 to be right justified.
I hope that makes sense.
|