Skip to main content

distance

Function distance 

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

Levenshtein distance between two ASCII-ish words, for “did you mean”.

Two rows rather than a full matrix, because the only caller compares one typo against thirty-two short names and a full matrix would be more code for the same answer.