compute the character positions at which two strings differ
DifferencePositions( s, t )
The DifferencePositions( s, t ) function computes the positions at which the strings s and t differ. It returns the (ordered) expression sequence of these positions. If s and t are equal, then NULL is returned. If s and t differ in length, then the positions up to the shorter of s and t are computed and returned.
The length of the returned expression sequence is equal to the Hamming distance between s and t, provided that s and t are the same length. (Note that the HammingDistance command computes the generalized Hamming distance for strings of unequal length.)
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.
The StringTools[DifferencePositions] command was introduced in Maple 18.
For more information on Maple 18 changes, see Updates in Maple 18.
Download Help Document
What kind of issue would you like to report? (Optional)