Rept

Generates a string of characters by repeating a sub-string.

Syntax

Rept(string, num)
string = character string you want to repeat
num = number of times to repeat the string

Remarks

If num is less than or equal to zero, the function will return an empty string.

Examples

Rept("0", 3) = "000"
Rept("abc", 2) = "abcabc"

Classification

Strings