strsim

Function levenshtein

source
pub fn levenshtein(a: &str, b: &str) -> usize
Expand description

Calculates the minimum number of insertions, deletions, and substitutions required to change one string into the other.

use strsim::levenshtein;

assert_eq!(3, levenshtein("kitten", "sitting"));