STR Function
Generates a string value containing a specified number of occurrences of a string.
Syntax
STR(string, times)
Syntax Elements
string is a DataBasic expression that evaluates to a string.
times is the number of occurrences of string to be included in the result.
If times is less than one, a null string is returned.
Comment
For strings containing fewer than ten characters, using a string literal is more efficient than the STR function.
Examples
S = STR('*',12)
Creates a string consisting of 12 asterisks (*) and assigns it to variable S.
PRINT STR('ABC',3)
Prints the string ABCABCABC
.
VAR = STR("A",2) B = "BBB" C = VAR:B
Assigns the string value AABBB
to variable C.
N = STR("?%?",4)
Assigns the string value ?%??%??%??%?
to variable N.