logo
pub fn levenshtein_distance(source: &str, target: &str) -> usize
Expand description

Calculate Levenshtein distance for two UTF-8 encoded strings.

Returns a minimum number of edits to transform from source to target string.

Levenshtein distance accepts three edit operations: insertion, deletion, and substitution.

References: