EditDistanceWithinRadius

STD.Str.EditDistanceWithinRadius( string1, string2, radius )

STD.Uni.EditDistanceWithinRadius( string1, string2, radius, locale )

string1The first of a pair of strings to compare.
string2The second of a pair of strings to compare.
radiusAn integer specifying the maximum acceptable edit distance.
localeA 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