StringTools
IsAnagram
test whether one string is an anagram of another
Calling Sequence
Parameters
Description
Examples
IsAnagram( s, t )
s
-
string
t
The IsAnagram(s,t) command returns the value true if the string s is an anagram (permutation) of the string t. Otherwise, the value false is returned.
If s and t are empty strings, the command returns true.
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.
with⁡StringTools:
IsAnagram⁡elvis,lives
true
IsAnagram⁡diet,edit
IsAnagram⁡tide,diet
IsAnagram⁡tide,toad
false
IsAnagram⁡the eyes,they see
IsAnagram⁡eleven plus two,twelve plus one
See Also
StringTools[Anagrams]
StringTools[IsPermutation]
Download Help Document