UserLand Software Home  |  Manila  |  Radio  |  Support  |  News

DocServer

Prev | Next | String Verbs > string.filledString

string.filledString

Syntax string.filledString (string, count)

Params string is the string of one or more characters you wish to repeat count times in creating a new string.

count is the desired number of times you want to repeat string to create a new string.

Action Creates a string filled with count copies of string.

Returns The resulting string.

Examples string.filledString ('.', 20)

   » "...................."

string.filledString ("What, me worry? ", 4)

   » "What, me worry? What, me worry? What, me worry? What, me worry? "

amount = "33.33";
amtLength = sizeof (amount);
fillChars = 10 - amtLength;
s = string.filledstring ('*', fillChars) + '$' + amount;
msg (s)

   » "*****$33.33"

The script above produces a formatted string which might be useful in check-writing.

Prev | Next | String Verbs > string.filledString

Anonymization by Anonymouse.org ~ Adverts
Anonymouse better ad-free, faster and with encryption?
X