libcproject
C static library easier to use than libc (C standard library).
|
Go to the source code of this file.
Data Structures | |
struct | array_list |
A dynamic array implementation. More... | |
Macros | |
#define | ARRAY_LIST_INITIAL_CAPACITY 10 |
Functions | |
struct array_list * | array_list_initialization () |
Initializes a new array list. More... | |
struct array_list * | array_list_initialization_with_capacity (size_t capacity) |
Initializes a new array list with a capacity. More... | |
void | array_list_add (struct array_list *list, void *element) |
Adds an element to the end of the array list. More... | |
void | array_list_remove (struct array_list *list, size_t index) |
Removes an element from the array list. More... | |
void * | array_list_get (struct array_list *list, size_t index) |
Gets an element from the array list. More... | |
void | array_list_free (struct array_list *list) |
Frees the array list. More... | |
#define ARRAY_LIST_INITIAL_CAPACITY 10 |
Definition at line 11 of file array_list.h.
struct array_list* array_list_initialization | ( | ) |
Initializes a new array list.
struct array_list* array_list_initialization_with_capacity | ( | size_t | capacity | ) |
Initializes a new array list with a capacity.
void array_list_add | ( | struct array_list * | list, |
void * | element | ||
) |
Adds an element to the end of the array list.
list | |
element |
void array_list_remove | ( | struct array_list * | list, |
size_t | index | ||
) |
Removes an element from the array list.
list | |
index |
void* array_list_get | ( | struct array_list * | list, |
size_t | index | ||
) |
Gets an element from the array list.
list | |
index |
void array_list_free | ( | struct array_list * | list | ) |
Frees the array list.
list |