fuzzy_compare in rust_fuzzy_search - Rust
Description: Use this function to compare 2 strings.
Keywords: rust, rustlang, rust-lang, fuzzy_compare

# Function rust_fuzzy_search::fuzzy_compare
[−][src]

    pub fn fuzzy_compare(a: &str, b: &str) -> f32

Use this function to compare 2 strings.

The output is a score (between `0.0f32 and 1.0f32`) representing how similar the 2 strings are.

Arguments:

- `a` : the first string to compare.
- `b` : the second string to compare.

example:

    fn test () {
        use rust_fuzzy_search::fuzzy_compare;
        let score : f32 = fuzzy_compare("kolbasobulko", "kolbasobulko");
        println!("score = {:?}", score);
    }

Run