System.StrUtils.ResemblesProc

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

ResemblesProc: TCompareTextProc = SoundexProc;

C++

extern DELPHI_PACKAGE TCompareTextProc ResemblesProc;

Properties

Type Visibility Source Unit Parent
variable public
System.StrUtils.pas
System.StrUtils.hpp
System.StrUtils System.StrUtils

Description

Controls the algorithm used by AnsiResemblesText to determine when two strings are similar. It is the same as AnsiResemblesProc.

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

To make AnsiResemblesText use a different algorithm, you can change ResemblesProc 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.

See Also