mirror of
https://github.com/theoludwig/libcproject.git
synced 2024-11-12 15:23:12 +01:00
feat: add terminal_print_array_list
This commit is contained in:
parent
368c07c57a
commit
9717cff35a
@ -111,3 +111,7 @@ void terminal_print_hash_map(struct hash_map* hash_map, void (*print_element)(vo
|
|||||||
}
|
}
|
||||||
printf("}\n");
|
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);
|
||||||
|
}
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include "array_list.h"
|
||||||
#include "character.h"
|
#include "character.h"
|
||||||
#include "hash_map.h"
|
#include "hash_map.h"
|
||||||
#include "linked_list.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*));
|
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
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user