Function strsim::jaro

source · []
pub fn jaro(a: &str, b: &str) -> f64
Expand description

Calculates the Jaro similarity between two strings. The returned value is between 0.0 and 1.0 (higher value means more similar).

use strsim::jaro;

assert!((0.392 - jaro("Friedrich Nietzsche", "Jean-Paul Sartre")).abs() <
        0.001);