<-- Previous || Up || Next -->

Is Anagram Function
String Words Class

Public Function IsAnagram( _
      ByVal vPhraseOne As Variant _
    , ByVal vPhraseTwo As Variant _
    , Optional ByVal vAlphabet As Variant _
    ) As Variant

Return True of the two phrases are anagrams of each others.
Anagrams are words which contain the same characters shuffled into different positions.
If the characters in one phrase can be rearranged into different positions to become the second phrase, then the two phrases are anagrams of each other.

Examples:
    IsAnagram("Abba", "Baba") = True
    IsAnagram("Tim Taylor", "Mortality") = True
    IsAnagram("Jill Taylor", "Jolly Trail") = True
    IsAnagram("Hello World", "This is a test.") = False
See also:
    SortCharacters Function
    IsAlliteration Function
    IsPalindrome Function
Note: See the Shareware program Namegram if your are interested in generating your own anagrams.

vPhraseOne: First of two phrases which are to be checked to determine if they are anagrams of each other. Function returns Null if vPhraseOne is Null of cannot be fixed up to a String.

vPhraseTwo: Second of two phrases which are to be checked to determine if they are anagrams of each other. Function returns Null if vPhraseTwo is Null of cannot be fixed up to a String.

vAlphabet: The characters within strings vPhraseOne and vPhraseTwo which are to be checked to see if they represent anagrams. vAlphabet defaults to the alphanumeric characters if it is missing or Null or cannot be fixed up to a String.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.