Skip to content

About

Levenshtein algorithm in Rust

Topics

Resources

Stars

53 stars

Watchers

3 watching

Forks

Latest commit

 

History

25 Commits

Folders and files

Repository files navigation

levenshtein.rs

Build Coverage Crate

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!

Installation

Cargo:

[dependencies]
levenshtein = "1.0.5"

Usage

extern crate levenshtein;
use levenshtein::levenshtein;

fn main() {
    println!("{}", levenshtein("kitten", "sitting"));
}

Yields:

3

API

fn levenshtein(a: &str, b: &str) -> usize

Given two strings, returns the edit distance between them.

License

MIT © Titus Wormer

About

Levenshtein algorithm in Rust

Topics

Resources

Stars

53 stars

Watchers

3 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages