gwidth: use std.mem.splitSequence
std.mem.split is deprecated post zig v0.13.0. Use std.mem.splitSequence instead
This commit is contained in:
parent
d33a9f9815
commit
dc0a228a55
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue