Simple C Expat Wrapper (SCEW)
1.1.7
|
Search for list items. More...
Files | |
file | list.h |
SCEW general list implementation. | |
Functions | |
SCEW_API scew_list * | scew_list_index (scew_list *list, unsigned int index) |
Gets the list item at the given index. More... | |
SCEW_API scew_list * | scew_list_find (scew_list *list, void *data) |
Finds the first list item that contains data. More... | |
SCEW_API scew_list * | scew_list_find_custom (scew_list *list, void const *data, scew_cmp_hook hook) |
Finds the first list item that matches the given predicate, hook. More... | |
Search for list items.
Gets the list item at the given index.
Finds the first list item that contains data.
SCEW_API scew_list* scew_list_find_custom | ( | scew_list * | list, |
void const * | data, | ||
scew_cmp_hook | hook | ||
) |
Finds the first list item that matches the given predicate, hook.
That is, all the list will be traversed calling the comparison hook for every list item. The comparison hook takes two parameters, the first one is the data of current traversed item, the second is data.
list | the list to traverse. |
data | the user data to be used as one of the arguments for the comparison. |
hook | the comparison function. |