|
Strgen Function |
Top Previous Next |
Function: |
Generates a string of len length consisting of repeating substrings substr. |
Syntax: |
strgen(len as byte,byref substr as string) as string |
See Also: |
--- |
Part |
Description |
len |
Length of the string to generate |
substr |
Substring that will be used (repeatedly) to generate the string |
Details
Notice that len parameter specifies total resulting string length in bytes so the last substring will be truncated if necessary to achieve exact required length. This function is an expanded version of the STRING$ function commonly found in other BASICs.
Examples
string1 = strgen(10,"ABC") ' result will be 'ABCABCABCA'.
|