Skip to main content

suggest

Function suggest 

Source
pub fn suggest<'a, I>(word: &str, candidates: I) -> Option<String>
where I: IntoIterator<Item = &'a str>,
Expand description

The closest candidate to word by edit distance, if it is close enough to be a likely typo (at most one edit per three characters, minimum one). A case-insensitive exact match always wins.