Function strsim::damerau_levenshtein [−][src]
pub fn damerau_levenshtein(a: &str, b: &str) -> usize
Like optimal string alignment, but substrings can be edited an unlimited number of times, and the triangle inequality holds.
use strsim::damerau_levenshtein; assert_eq!(2, damerau_levenshtein("ab", "bca"));