Compute edit distance

levenshtein(s1, s2)

Arguments

s1

first character vector

s2

second character vector

Value

the integer number of edits between strings

Details

If neither string is greater than ten characters, there is no allocation. Otherwise, allocation is amortized constant.