https://github.com/nektro/zig-leven
Measure the difference between two slices using the Levenshtein distance algorithm
https://github.com/nektro/zig-leven
zig zig-package
Last synced: 26 days ago
JSON representation
Measure the difference between two slices using the Levenshtein distance algorithm
- Host: GitHub
- URL: https://github.com/nektro/zig-leven
- Owner: nektro
- License: mit
- Created: 2021-07-27T06:59:53.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2025-02-16T06:11:32.000Z (3 months ago)
- Last Synced: 2025-03-25T22:51:31.143Z (about 1 month ago)
- Topics: zig, zig-package
- Language: Zig
- Homepage:
- Size: 11.7 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zig - zig-leven🗒️Measure the difference between two slices using the Levenshtein distance algorithm
README
# zig-leven
Measure the difference between two slices using the Levenshtein distance algorithm
Adapted from https://github.com/sindresorhus/leven
## Built With
- Zig master
- https://github.com/ziglang/zig
- Zigmod package manager
- https://github.com/nektro/zigmod## Install
```
zigmod aq add 1/nektro/leven
```## Usage
`pub fn leven(comptime T: type, alloc: *std.mem.Allocator, a: []const T, b: []const T, max: ?usize) !usize`## Future
TODO Unicode support for strings## License
MIT