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

Online Help

All Products    Maple    MapleSim


StringTools

  

Repeats

  

compute the maximal repeated substrings in a string

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Repeats( s )

Parameters

s

-

Maple string

Description

• 

The Repeats(s) command returns an expression sequence of lists indicating the maximal repeated substrings of the input string s.

• 

Each list has the form pos1,pos2,len, where pos1 is the position in s at which the first member of the repeat starts, pos2 is the position in s at which the second member of the repeat starts, and len is the length of the repeated substring appearing at positions pos1 and pos2 in s.

• 

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:

Repeatsabcde

Repeatsabab

1,3,2

(1)

Repeatsababa

1,5,1,1,3,3

(2)

Repeatsabababa

1,7,1,1,5,3,1,3,5

(3)

See Also

string

StringTools