StringTools
Repeat
repeatedly catenate a string with itself
Calling Sequence
Parameters
Description
Examples
Repeat( s, n )
s
-
string
n
non-negative (32-bit) integer
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.
with⁡StringTools:
Repeat⁡abc,0
Repeat⁡abc,5
abcabcabcabcabc
Repeat⁡,5
Repeat⁡,0
See Also
length
StringTools[Fill]
StringTools[IsPrimitive]
Download Help Document