diff --git a/lib/terminal.c b/lib/terminal.c index 6209ada..d352c52 100644 --- a/lib/terminal.c +++ b/lib/terminal.c @@ -111,3 +111,7 @@ void terminal_print_hash_map(struct hash_map* hash_map, void (*print_element)(vo } printf("}\n"); } + +void terminal_print_array_list(struct array_list* list, void (*print_element)(void*)) { + terminal_print_array(list->data, list->size, sizeof(void*), print_element); +} diff --git a/lib/terminal.h b/lib/terminal.h index 1bf62b8..1eba360 100644 --- a/lib/terminal.h +++ b/lib/terminal.h @@ -6,6 +6,7 @@ #include #include +#include "array_list.h" #include "character.h" #include "hash_map.h" #include "linked_list.h" @@ -106,4 +107,13 @@ void terminal_print_linked_list(struct linked_list* linked_list, void (*print_el */ void terminal_print_hash_map(struct hash_map* hash_map, void (*print_element)(void*)); +/** + * @brief Print an array list. + * + * @param array_list + * @param print_element + * @since v2.1.0 + */ +void terminal_print_array_list(struct array_list* list, void (*print_element)(void*)); + #endif