Skip to main content

typo_distance

Function typo_distance 

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

Edit distance where swapping two adjacent characters is one edit (the optimal string alignment distance) — the typo a fast typist makes most (doen for done), which plain Levenshtein counts as two.