DoxigAlpha

replaceRange

Grows or shrinks the list as necessary. Invalidates element pointers if additional capacity is allocated. Asserts that the range is in bounds.

Function parameters

Parameters

#
self:*Self
start:usize
len:usize
new_items:[]const T

Deprecated.

Functions

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

Source

Implementation

#
pub fn replaceRange(self: *Self, start: usize, len: usize, new_items: []const T) Allocator.Error!void {
    var unmanaged = self.moveToUnmanaged();
    defer self.* = unmanaged.toManaged(self.allocator);
    return unmanaged.replaceRange(self.allocator, start, len, new_items);
}