Function init [src]
Prototype
pub fn init(buffer: [:0]const u8) Tokenizer
Parameters
buffer: [:0]const u8
Source
pub fn init(buffer: [:0]const u8) Tokenizer {
// Skip the UTF-8 BOM if present.
return .{
.buffer = buffer,
.index = if (std.mem.startsWith(u8, buffer, "\xEF\xBB\xBF")) 3 else 0,
};
}