DoxigAlpha

slice

Function parameters

Parameters

#
start:usize
end:?usize

Type definitions in this namespace

Types

#
ImportHintNameEntry
Every name ends with a NULL byte.

Error sets in this namespace

Error Sets

#

= 0x10b

Values

#

Source

Implementation

#
pub fn slice(self: Symtab, start: usize, end: ?usize) Slice {
    const offset = start * Symbol.sizeOf();
    const llen = if (end) |e| e * Symbol.sizeOf() else self.buffer.len;
    const num = @divExact(llen - offset, Symbol.sizeOf());
    return Slice{ .buffer = self.buffer[offset..][0..llen], .num = num };
}