Repeat - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


StringTools

  

Repeat

  

repeatedly catenate a string with itself

 

Calling Sequence

Parameters

Description

Examples

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

withStringTools:

Repeatabc,0

(1)

Repeatabc,5

abcabcabcabcabc

(2)

Repeat,5

(3)

Repeat,0

(4)

See Also

length

StringTools

StringTools[Fill]

StringTools[IsPrimitive]