Soundex Algorithm |
![]() |
|
|
|
|
|
This method will return the soundex value of the contained string. A soundex is always a four-character string, beginning with a letter, followed by three decimal digits.
Soundex is an algorithm devised to determine phonetic similarity between two names, with the general idea being that similarly sounding names will return the same soundex value (which then can be used, perhaps, for searching in a database).
Example:
Str name1(_T("Smith"));
Str name2(_T("Smyth"));
BOOL very_similar = (name1.Soundex() == name2.Soundex());
See also: Trimming / case / miscellaneous