const std = @import("std"); pub fn main() void { // 'e-acute' is two UTF-8 bytes, so len is 4 for "cafe" const s = "caf\u{e9}"; std.debug.print("{s} is {d} bytes\n", .{ s, s.len }); }
len is byte length, not char count