STD.Str.EditDistanceWithinRadius( string1, string2, radius )
STD.Uni.EditDistanceWithinRadius( string1, string2, radius, locale )
string1 | The first of a pair of strings to compare. |
string2 | The second of a pair of strings to compare. |
radius | An integer specifying the maximum acceptable edit distance. |
locale | A null-terminated string containing the language and country code to use to determine correct sort order and other operations. |
Return: | EditDistanceWithinRadius returns a BOOLEAN value. |
The EditDistanceWithinRadius function returns TRUE if the edit distance between string1 and string2 is within the radius. The two strings are trimmed before comparison.
Example:
IMPORT STD; STD.Str.EditDistance('CAT','BAIT'); //returns 2 STD.Str.EditDistanceWithinRadius('CAT','BAIT',1); //returns FALSE STD.Str.EditDistanceWithinRadius('CAT','BAIT',2); //returns TRUE