Indicates whether two strings are similar.
function AnsiResemblesText(const AText: string; const AOther: string): Boolean;
Boolean AnsiResemblesText(const AnsiString AText, const AnsiString AOther);
StrUtils
AnsiResemblesText 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.
The algorithm that controls whether AnsiResemblesText considers two strings similar is specified by the AnsiResemblesProc variable. By default, AnsiResemblesProc is set to SoundExProc, which converts both strings to a phonetic representation using a SoundEx algorithm and compares up to 4 characters of the resulting phonetic representation. By changing the function assigned to AnsiResemblesProc, you can change the comparison made by AnsiResemblesText.
SoundExProc
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|