| ... | @@ -1,25 +1,19 @@ | ... | @@ -1,25 +1,19 @@ |
| 1 | # zig-leven | 1 | # zig-leven |
| 2 | | 2 | |
| | 3 |  |
| | 4 | [](https://github.com/nektro/zig-leven/blob/master/LICENSE) |
| | 5 | [](https://github.com/sponsors/nektro) |
| | 6 | [](https://ziglang.org/) |
| | 7 | [](https://github.com/nektro/zigmod) |
| | 8 | |
| 3 | Measure the difference between two slices using the Levenshtein distance algorithm | 9 | Measure the difference between two slices using the Levenshtein distance algorithm |
| 4 | | 10 | |
| 5 | Adapted from https://github.com/sindresorhus/leven | 11 | Adapted from https://github.com/sindresorhus/leven |
| 6 | | 12 | |
| 7 | ## Built With | | |
| 8 | - Zig master | | |
| 9 | - https://github.com/ziglang/zig | | |
| 10 | - Zigmod package manager | | |
| 11 | - https://github.com/nektro/zigmod | | |
| 12 | | | |
| 13 | ## Install | | |
| 14 | ``` | | |
| 15 | zigmod aq add 1/nektro/leven | | |
| 16 | ``` | | |
| 17 | | | |
| 18 | ## Usage | 13 | ## Usage |
| | 14 | |
| 19 | `pub fn leven(comptime T: type, alloc: *std.mem.Allocator, a: []const T, b: []const T, max: ?usize) !usize` | 15 | `pub fn leven(comptime T: type, alloc: *std.mem.Allocator, a: []const T, b: []const T, max: ?usize) !usize` |
| 20 | | 16 | |
| 21 | ## Future | 17 | ## Future |
| 22 | TODO Unicode support for strings | | |
| 23 | | 18 | |
| 24 | ## License | 19 | TODO Unicode support for strings |
| 25 | MIT | | |