RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
StrUtils.SoundexCompare Function

Compares the Soundex representations of two strings.

Pascal
function SoundexCompare(const AText: string; const AOther: string; ALength: TSoundexLength = 4): Integer;
C++
int SoundexCompare(const AnsiString AText, const AnsiString AOther, TSoundexLength ALength = 4);

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) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!