compute the maximal repeated substrings in a string - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Names and Strings : StringTools Package : Statistics : StringTools/Repeats

StringTools[Repeats] - compute the maximal repeated substrings in a string

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.

• 

 

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


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam