#Standard way to get a [:0]const u8 from a []const u8?
1 messages · Page 1 of 1 (latest)
well I don't know about a standard way, but you can allocPrintZ with {s}
there may be a better way though..
thats fine for me, thanks 🙂
bufPrintZ might be better
If you know the string has a null sentinel you can use std.mem.span
since you know how much to allocate
Otherwise dupeZ, yes
dupeZ! nice, that's what I was looking for