DoxigAlpha

addManyAsArrayAssumeCapacity

Resize the array, adding n new elements, which have undefined values.

The return value is an array pointing to the newly allocated elements.

Never invalidates element pointers.

The returned pointer becomes invalid when the list is resized.

Asserts that the list can hold the additional items.

Function parameters

Parameters

#
self:*Self
n:usize

Deprecated.

Functions

#
Managed
Deprecated.
AlignedManaged
Deprecated.
Aligned
A contiguous, growable list of arbitrarily aligned items in memory.

Source

Implementation

#
pub fn addManyAsArrayAssumeCapacity(self: *Self, comptime n: usize) *[n]T {
    assert(self.items.len + n <= self.capacity);
    const prev_len = self.items.len;
    self.items.len += n;
    return self.items[prev_len..][0..n];
}