repeat

Syntax

repeat(X, n)

Arguments

X is a string scalar/vector.

n is a positive integer.

Details

Repeats each item in string X n times to form a new string. The size of the result is the same as the size of X.

Examples

repeat(`FB, 3);
// output
FBFBFB

repeat(`AB`CD,2);
// output
["ABAB","CDCD"]