Module syntax::util::lev_distance [] [src]

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Functions

find_best_match_for_name [
Experimental
]

To find the best match for a given string from an iterator of names As a loose rule to avoid the obviously incorrect suggestions, it takes an optional limit for the maximum allowable edit distance, which defaults to one-third of the given word. Besides Levenshtein, we use case insensitive comparison to improve accuracy on an edge case with a lower(upper)case letters mismatch.

lev_distance [
Experimental
]

To find the Levenshtein distance between two strings