RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
StrUtils.SoundexInt Function

Converts a string into an integer that represents its phonetic value.

Pascal
function SoundexInt(const AText: string; ALength: TSoundexIntLength = 4): Integer;
C++
int SoundexInt(const AnsiString AText, TSoundexIntLength ALength = 4);

StrUtils

SoundexInt uses a Soundex algorithm to convert the string specified by AText into a phonetic representation where each character of the resulting string represents one of six families of similar phonemes. It then returns an integer that uniquely represents the first ALength Soundex codes in that string representation.

Note: The TSoundexIntLength type represents an integer between 1 and 8. This is because the size of the integer return value limits the number of Soundex codes that can be used in the final representation.
 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!