Vladimir Levenshtein’s edit distance algorithm as a Rust library. There’s also a C library, C user command, and JavaScript module.
🎉 This is my first attempt at Rust!
[dependencies]
levenshtein = "1.0.5"
extern crate levenshtein;
use levenshtein::levenshtein;
fn main() {
println!("{}", levenshtein("kitten", "sitting"));
}
Yields:
3
Given two strings, returns the edit distance between them.