LEVENSHTEIN() - Get Levenshtein distance between two strings

Syntax

LEVENSHTEIN(str1,str2{,ERR=lineref})

Description

In BBj 18.00 and higher, the LEVENSHTEIN() function returns the Levenshtein distance between two strings.

Parameter

Description

str1

First string.

str2

Second string.

ERR=lineref

Branch to be taken if an error occurs during execution.

Example

READY
>print Levenshtein("xyzzy","xyzzy")
 0
>print Levenshtein("kitten","sitting")
 3
>print Levenshtein("flaw","lawn")
 2
>

See Also

Levenshtein distance

SQL - String Functions

Functions - Alphabetical Listing