summaryrefslogtreecommitdiffstats
path: root/vendor/similar/examples/close-matches.rs
blob: ebe283a0308ccf9128936cfec1efd742b1aa056e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use similar::get_close_matches;

fn main() {
    let words = vec![
        "apple",
        "appu",
        "appal",
        "apparitor",
        "beer",
        "beeb",
        "beeline",
    ];
    println!("{:?}", get_close_matches("app", &words, 3, 0.7));
    println!("{:?}", get_close_matches("bee", &words, 3, 0.7));
}