Variable length string
jtigor
I would like to fill a string with "*", where the number of characters varies from run to run. In one run the string could consist of ten "*" and the next it could be 20. Does this need to be constructed with a loop:
do
sString += "*"
nIndex += 1
while (nIndex < nLimit)
sString += "*"
nIndex += 1
while (nIndex < nLimit)
or is there a simpler way?
Thanks.
PadString
should do the trick.
July 27, 2020 at 05:49 am - Permalink
In reply to PadString should do the… by thomas_braun
Thanks. I knew there must be something, but couldn't bring it to mind.
July 27, 2020 at 05:54 am - Permalink