damerau_levenshtein

Function damerau_levenshtein 

Source
fn damerau_levenshtein(a: &str, b: &str) -> usize
Expand description

Damerau-Levenshtein distance function

returns usize::MAX if there’s no common characters at all mostly to avoid confusing error messages - “you typed ‘foo’, maybe you ment ‘bar’” where ‘foo’ and ‘bar’ don’t have anything in common