Function darray_filter
Defined in File darray.h
Function Documentation
-
struct darray *darray_filter(struct darray *arr, bool_t (*pred)(const void *e), uint32_t flags, void *elements)
Filter out elements into a new darray.
Iterate through the darray and find all the items that satisfy the predicate, and return a new darray containing only the items for which the predicate returned true. Matched elements are transferred from the original array to the new array, and removed from the original array. If no elements are found that fulfill the predicate, an empty darray is returned.