compute the overlap of two strings - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Names and Strings : StringTools Package : Combinatorics on Words : StringTools/Overlap

StringTools[Overlap] - compute the overlap of two strings

Calling Sequence

Overlap( s, t )

Parameters

s

-

string

t

-

string

Description

• 

The Overlap(s,t) command computes the length of the overlap between s and t in linear time. This is defined to be the length of the longest suffix of s that is a prefix of t.

• 

Note that, in general, Overlap( s, t ) and Overlap( t, s ) are different.

Examples

withStringTools:

Overlapabc,def

0

(1)

Overlapabc,cdef

1

(2)

Overlapabcdef,defg

3

(3)

See Also

length, StringTools, StringTools[Border]


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