System.StrUtils.AnsiResemblesText
Delphi
function AnsiResemblesText(const AText, AOther: string): Boolean;
C++
extern DELPHI_PACKAGE bool __fastcall AnsiResemblesText(const System::UnicodeString AText, const System::UnicodeString AOther)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.StrUtils.pas System.StrUtils.hpp |
System.StrUtils | System.StrUtils |
Description
Indicates whether two strings are similar.
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.