matchr-rs 0.1.1

Fast fuzzy string matching — Levenshtein, Jaro-Winkler, and trigram similarity. Usable from Rust and Python.
Documentation
pub fn normalize(s: &str) -> String {
    s.trim().to_lowercase()
}

#[cfg(test)]
mod test {
    use super::*;

    #[test]
    fn test_lowercase() {
        assert_eq!(normalize("Hello"), "hello");
    }

    #[test]
    fn test_trim() {
        assert_eq!(normalize(" hello "), "hello");
    }

    #[test]
    fn test_both() {
        assert_eq!(normalize(" Hello World "), "hello world")
    }
}