Repeat - Maple Help

StringTools

 Repeat
 repeatedly catenate a string with itself

 Calling Sequence Repeat( s, n )

Parameters

 s - string n - non-negative (32-bit) integer

Description

 • The Repeat( s, n ) command catenates the string s with itself n times. If either $n=0$ or $s=""$, then the empty string $""$ is returned.
 • The Repeat command implements the powering operation in the free monoid generated by the nonzero bytes.
 • All of the StringTools package commands treat strings as (null-terminated) sequences of $8$-bit (ASCII) characters.  Thus, there is no support for multibyte character encodings, such as unicode encodings.

Examples

 > $\mathrm{with}\left(\mathrm{StringTools}\right):$
 > $\mathrm{Repeat}\left("abc",0\right)$
 ${""}$ (1)
 > $\mathrm{Repeat}\left("abc",5\right)$
 ${"abcabcabcabcabc"}$ (2)
 > $\mathrm{Repeat}\left("",5\right)$
 ${""}$ (3)
 > $\mathrm{Repeat}\left("",0\right)$
 ${""}$ (4)