Skip to main content

nearest

Function nearest 

Source
pub fn nearest<'a>(name: &str, candidates: &[&'a str]) -> Option<&'a str>
Expand description

The nearest candidate: Levenshtein distance ≤ 2, or a prefix relation either way; ties → the bytewise-first.