RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
StrUtils.AnsiResemblesProc Variable

Controls the algorithm used by AnsiResemblesText to determine when two strings are similar.

Pascal
AnsiResemblesProc: TCompareTextProc = SoundexProc;
C++
TCompareTextProc AnsiResemblesProc = SoundexProc;

StrUtils

The AnsiResemblesText function uses the function assigned to AnsiResemblesProc to determine when two strings should be considered similar. By default, AnsiResemblesProc is set to SoundExProc.  

To make AnsiResemblesText use a different algorithm, you can change AnsiResemblesProc to another function. For example, you can change the number of phonemes compared by using a function that assigns a different length to SoundExSimilar than then default value of 4. Alternately, you can create a function that uses a different algorithm entirely. 

 

AnsiResemblesText 

SoundExSimilar

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