|| A string function that returns a string whose characters all have a given
ASCII code or whose characters are all the first character of a string expression.
Syntax: STRING$(count, byte)
A$ = STRING$(9, 65) '-- Returns AAAAAAAAA
Syntax: STRING$(count, string-expression)
A$ = STRING$(9, "ABC") '-- Returns AAAAAAAAA
The first parameter indicates the number of times to repeat the character.
The second parameter can either be a string expression, whose first character is
used as the repeat character, or a byte number in the range from 0 to 255 representing the
ASCII character code.
RapidQ limits STRING$ to a 2K buffer and there's no error checking
for overflow. For large strings use the SnakeDile fixed
November, 2006 or later, which is also a lot faster, f you can't
get the fixed libs, you can also
patch it with this code.
FUNCTIONI gRQ2_STRINGex$(...) AS
STRING 'FunctionI to accept byte or Char
DEFLNG Count = ParamVal(1)
IF Count > 0 THEN
IF ParamStrCount THEN
= ParamVal(2) AND &HFF
DIM tmpStr AS STRING *
RESULT = tmpStr
RESULT = ""
$DEFINE STRING$ gRQ2_STRINGex$