RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
StrUtils.SoundexSimilar Function

Indicates whether two strings are similar.

Pascal
function SoundexSimilar(const AText: string; const AOther: string; ALength: TSoundexLength = 4): Boolean;
C++
Boolean SoundexSimilar(const AnsiString AText, const AnsiString AOther, TSoundexLength ALength = 4);

SoundexSimilar returns true if the string specified by AText is "similar" to the string specified by AOther, or false if the two strings are not sufficiently similar. 

SoundexSimilar uses a Soundex algorithm to convert both strings into a phonetic representation where each character of the resulting string represents one of six families of similar phonemes. It then compares up to ALength digits in the resulting representation, returning true if they are all the same and false if they are not. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!