DoxigAlpha

appendSliceAssumeCapacity

Append the slice of items to the list.

Asserts that the list can hold the additional items.

Function parameters

Parameters

#
self:*Self
items:[]const T

Deprecated.

Functions

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

Source

Implementation

#
pub fn appendSliceAssumeCapacity(self: *Self, items: []const T) void {
    const old_len = self.items.len;
    const new_len = old_len + items.len;
    assert(new_len <= self.capacity);
    self.items.len = new_len;
    @memcpy(self.items[old_len..][0..items.len], items);
}