55 if (count > self->
count)
58 if (destination != NULL)
79 if (count > self->
count)
81 size_t remaining = self->
count - count;
void * array_end(const array_t *self)
One-past-the-end pointer of the array.
void * array_get(const array_t *self, size_t index)
Pointer of the element at position index of the array.
Internal state of a dynamic array.
size_t array_offset(const array_t *self, size_t count)
The size in memory of count elements.
bool array_reserve(array_t *self, size_t count)
Ensures the array has enough capacity to fit count new elements, reallocating if needed.
bool array_pop_back_n(array_t *self, void *destination, size_t count)
Moves to destination the n last elements of the array.
bool array_push_back_n(array_t *self, const void *elements, size_t count)
Adds count elements at the end of the array.
bool array_push_back(array_t *self, const void *element)
Adds one element at the end of the array.
bool array_pop_back(array_t *self, void *destination)
Moves to destination the last element of the array.
bool array_pop_front(array_t *self, void *destination)
Moves to destination the first element of self.
bool array_pop_front_n(array_t *self, void *destination, size_t count)
Moves to destination the count first elements of self.
Dynamic string implementation.
O2S array implementation.
void * start
Underlying storage.
size_t count
Number of elements currently stored.