fn fromOwnedSliceSentinel(allocator: Allocator, comptime sentinel: T, slice: [:sentinel]T) Self

ArrayList takes ownership of the passed in slice. The slice must have been allocated with allocator. Deinitialize with deinit or use toOwnedSlice.

Parameters

allocator: Allocator,
sentinel: T,
slice: [:sentinel]T,