rept
Repeat a string a specified number of times.
Syntax
Section titled “Syntax”v = rept(text, number_times)Description
Section titled “Description”Returns text concatenated with itself number_times times. With number_times = 0, returns an empty string.
Examples
Section titled “Examples”rept('-', 5) % '-----'rept('ab', 3) % 'ababab'See also
Section titled “See also”strcat— Concatenate strings horizontally.