#std.mem.copy doesn't copy sentinel?
1 messages · Page 1 of 1 (latest)
so there isn't a std function to copy with the sentinel?
it's kinda annoying to have to setup the sentinel manually afterward
especially when it's in nested structures like that x)
You could try std.mem.copy(u8, &dest, source[0..source.len + 1])? idk if that'll work but it might
i think it will trigger safety check, no?
Try it and see
technically it will access out of bounds of the source
You're allowed to access the sentinel
it works indeed, thx