Compares the Soundex representations of two strings.
function SoundexCompare(const AText: string; const AOther: string; ALength: TSoundexLength = 4): Integer;
int SoundexCompare(const AnsiString AText, const AnsiString AOther, TSoundexLength ALength = 4);
StrUtils
SoundexCompare uses a Soundex algorithm to convert the strings specified by AText and AOther into phonetic representations where each character of the resulting string represents one of six families of similar phonemes. It then compares the first ALength characters of the resulting representations by calling AnsiCompareStr.
SoundexCompare returns 0 if the first ALength characters of the phonetic representations are identical, a value less then 0 if the representation of AText is less than the representation of AOther, and a value greater than 0 if the representation of AText is greater than the representation of AOther.
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|