IsAnagram - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


StringTools

  

IsAnagram

  

test whether one string is an anagram of another

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

IsAnagram( s, t )

Parameters

s

-

string

t

-

string

Description

• 

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.

Examples

withStringTools:

IsAnagramelvis,lives

true

(1)

IsAnagramdiet,edit

true

(2)

IsAnagramtide,diet

true

(3)

IsAnagramtide,toad

false

(4)

IsAnagramthe eyes,they see

true

(5)

IsAnagrameleven plus two,twelve plus one

true

(6)

See Also

string

StringTools

StringTools[Anagrams]

StringTools[IsPermutation]