zig-leven

May 21, 2025 ยท View on GitHub

loc license nektro @ github sponsors Zig Zigmod

Measure the difference between two slices using the Levenshtein distance algorithm

Adapted from https://github.com/sindresorhus/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