Skip to main content

levenshtein

Function levenshtein 

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

Compute the Levenshtein edit distance between two strings.

Uses the classic two-row dynamic programming approach for O(min(m,n)) memory. Each cell considers insertion, deletion, and substitution.