List<T>
class List<T: copyable>A vectorized list of items.
Remarks
A List<T> wraps an array, copying elements in and out, and growing it as necessary.
All methods that accept indexes or ranges are safe to call with out-of-range values.
Lifecycle members
Initializes an empty list and remembers the allocator used for storage.
Releases the allocated element buffer, if any.
Instance members
Adds or inserts a single item.
Adds or inserts all items from an array.
Returns the matching sorted index, or -1 when no match is found.
Clears the list and optionally releases its buffer.
Allocates a new array and copies a range of items into it.
Allocates a new list and copies a range of items into it.
Copies a range of items into an existing array.
Ensures the buffer has at least the requested number of slots.
Returns the first matching index, or -1 when no match is found.
Returns the last matching index, or -1 when no match is found.
Returns a pointer to an item in the backing buffer.
Returns the number of allocated item slots.
Returns a writer that appends characters to the list.
Returns the item at an index.
Returns the number of items in the list.
Removes one item and returns 1 when an item was removed.
Removes a range and returns the number of items removed.
Replaces the item at an index.
Sorts the list in place using the supplied comparer.
Transfers the used buffer span to the caller and empties the list.
Generated with campc v0.4.0-preview.1+d50446ef951a6ed675f7086cf093dbc993f0041b.