| Crates.io | edit-distance |
| lib.rs | edit-distance |
| version | 2.2.2 |
| created_at | 2015-05-01 14:23:55.738292+00 |
| updated_at | 2025-10-03 10:58:24.414176+00 |
| description | Levenshtein edit distance between strings, a measure for similarity. |
| homepage | |
| repository | https://github.com/febeling/edit-distance |
| max_upload_size | |
| id | 1997 |
| size | 24,270 |
Calculate Levenshtein distance between two strings.
The Levenshtein edit distance is a measure for the similarity between two strings. It's helpful for spelling correction, fuzzy completion, type-ahead and similar use cases.
This implementation supports Unicode.
In Cargo.toml add
[dependencies]
edit-distance = "2.2.2"
Then re-run cargo build. That fetches the dependencies and builds
the code.
extern crate edit_distance;
edit_distance("kitten", "sitting"); // => 3
Test changes before comitting.
cargo clean
cargo fmt --all -- --check
cargo build
cargo test
cargo publish
git push
git push --tags
2025-10-03 2.2.2 Parameter AsRef
2025-10-03 2.2.1 Fix README
2025-10-03 2.2.1 Use edition 2021, MSRV 1.56
2024-09-04 2.1.3 Update dev-dependency
2024-06-26 2.1.2 Fix formatting
2024-06-26 2.1.1 Replace CI badge, maintenance
2019-03-02 2.1.0 Optimize memory usage
2018-01-02 2.0.1 Update dev-dependencies
2017-07-02 2.0.0
2015-05-01 1.0.0 Release
2015-04-18 0.0.1 Initial upload
Before sending a pull-request that goes beyond a bugfix, please open an issue to discuss. PRs without clear objective or separation of concerns aren't likely to be accepted.
Thanks to @skade for very helpful criticism of my first rust lib.
APL 2.0, see LICENSE file.