Sign in Join
FPDoc Onlineexperiment

SoundexCompare function

In unit StrUtils

Compare soundex values of 2 strings.

Declaration

pascal
function SoundexCompare(const AText: string; const AOther: string; 
 ALength: TSoundexLength): Integer

Arguments

AText

First string.

AOther

Second string.

ALength

Length of soundexes to compare.

Function result

0 if the soundexes are equal. Negative of the first is smaller as the second, positive otherwise.

Description

SoundexCompare computes the soundex codes of AText and AOther and feeds these to CompareText. It will return -1 if the soundex code of AText is less than the soundex code of AOther, 0 if they are equal, and 1 if the code of AOther is larger than the code of AText.

Errors

None.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.