strgen Function

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 the len parameter specifies the total resulting string length in bytes, so the last substring will be truncated if necessary to achieve the exact required length. This function is an expanded version of the STRING$ function commonly found in other implementations of BASIC.


Examples

Tibbo BASIC
string1 = strgen(10,"ABC") ' result will be 'ABCABCABCA'.

strgen Function

Details

Examples