pub fn fromOwnedSliceSentinel(comptime sentinel: T, slice: [:sentinel]T) Self
ArrayList takes ownership of the passed in slice. Deinitialize with deinit or use toOwnedSlice.
deinit
toOwnedSlice
sentinel: T
slice: [:sentinel]T
737 738 739 740 741 742 743
pub fn fromOwnedSliceSentinel(comptime sentinel: T, slice: [:sentinel]T) Self { return Self{ .items = slice, .capacity = slice.len + 1, .pointer_stability = .{}, }; }
ArrayList takes ownership of the passed in slice. Deinitialize with
deinitor usetoOwnedSlice.