StringTools[PrefixDistance] - compute the prefix distance between two strings
StringTools[SuffixDistance] - compute the suffix distance between two strings
|
Calling Sequence
|
|
PrefixDistance( s, t )
SuffixDistance( s, t )
|
|
Parameters
|
|
s
|
-
|
Maple string
|
t
|
-
|
Maple string
|
|
|
|
|
Description
|
|
•
|
The PrefixDistance(s,t) and SuffixDistance(s,t) commands return integer measures of the distance between the two strings s and t.
|
|
|
Examples
|
|
>
|
|
| (1) |
>
|
|
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
>
|
|
| (7) |
>
|
|
| (8) |
>
|
|
| (9) |
Being metrics, both PrefixDistance and SuffixDistance satisfy the triangle inequality.
>
|
|
| (10) |
>
|
|
| (11) |
>
|
|
| (12) |
>
|
|
| (13) |
>
|
|
| (14) |
|
|
Download Help Document
Was this information helpful?