Function nextCodepointSlice [src]
Prototype
pub fn nextCodepointSlice(it: *Wtf8Iterator) ?[]const u8
Parameters
it: *Wtf8Iterator
Source
pub fn nextCodepointSlice(it: *Wtf8Iterator) ?[]const u8 {
if (it.i >= it.bytes.len) {
return null;
}
const cp_len = utf8ByteSequenceLength(it.bytes[it.i]) catch unreachable;
it.i += cp_len;
return it.bytes[it.i - cp_len .. it.i];
}