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

String Similarity Function
String Extras Class

Public Function StringSimilarity( _
      ByVal vPhraseOne As Variant _
    , ByVal vPhraseTwo As Variant _
    ) As Variant

Returns a percentage characterizing the similarity of the two phrases based upon the number characters which they have in common.

Examples:
    StringSimilarity("This is a test.", "THIS IS A SAMPLE.") = 81
    StringSimilarity(Gettysburg, Mayflower) = 83
    StringSimilarity("Entisoft", "Tools") = 46
See also:
    SummarizeText Function
    MetaPhone Function
    Soundex Function
vPhraseOne: First of two phrases which are to be compared to determine their similarity. Function returns Null if vPhraseOne is Null or cannot be fixed up to a String.

Note: Strings are first converted to upper-case so that, in effect, this function uses Text comparisons to determine if characters match.

vPhraseTwo: Second of two phrases which are to be compared to determine their similarity. Function returns Null if vPhraseTwo is Null or cannot be fixed up to a String.

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