Skip to content

Commit

Permalink
gwidth: use std.mem.splitSequence
Browse files Browse the repository at this point in the history
std.mem.split is deprecated post zig v0.13.0. Use std.mem.splitSequence
instead
  • Loading branch information
dasimmet authored and rockorager committed Nov 13, 2024
1 parent d33a9f9 commit dc0a228
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gwidth.zig
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub fn gwidth(str: []const u8, method: Method, data: *const DisplayWidth.Display
return total;
},
.no_zwj => {
var iter = std.mem.split(u8, str, "\u{200D}");
var iter = std.mem.splitSequence(u8, str, "\u{200D}");
var result: u16 = 0;
while (iter.next()) |s| {
result += gwidth(s, .unicode, data);
Expand Down

0 comments on commit dc0a228

Please sign in to comment.