get
Function parameters
Parameters
The data stored at byte offset 0 when ZOIR is stored in a file.
Types
- Header
- The data stored at byte offset 0 when ZOIR is stored in a file.
Functions in this namespace
Functions
Source
Implementation
pub fn get(nts: NullTerminatedString, zoir: Zoir) [:0]const u8 {
const idx = std.mem.indexOfScalar(u8, zoir.string_bytes[@intFromEnum(nts)..], 0).?;
return zoir.string_bytes[@intFromEnum(nts)..][0..idx :0];
}