pub fn insertSliceAssumeCapacity(
self: *Self,
index: usize,
items: []const T,
) void self: *Selfindex: usizeitems: []const T947
948
949
950
951
952
953
954 pub fn insertSliceAssumeCapacity(
self: *Self,
index: usize,
items: []const T,
) void {
const dst = self.addManyAtAssumeCapacity(index, items.len);
@memcpy(dst, items);
}
Insert slice
itemsat indexindexby movinglist[index .. list.len]to make room. This operation is O(N). Invalidates pre-existing pointers to elements at and afterindex. Asserts that the list has capacity for the additional items. Asserts that the index is in bounds or equal to the length.