levenshtein

Purpose

Levenshtein edit-distance between two strings.

Syntax

returnedNum = levenshtein(string1, string2)

returnedNum - type: num
string1 - type: str
string2 - type: str

Returns

Edit distance.

Remarks

Does not allow an empty string.

Example

L("distance") = levenshtein("hello","hell");

# This should evaluate to 1.

See Also

String Functions