Checks whether needle exists in haystack, using the given equal_func.
If the element is found, true is returned and the element’s index is returned in index_ (if non-`NULL`). Otherwise, false
is returned and index_ is undefined. If needle exists multiple times in haystack, the index of the
first instance is returned.
equal_func is called with the element from the array as its first parameter, and needle as its second
parameter. If equal_func is `NULL`, pointer equality is used.
| needle |
the pointer to look for |
| equal_func |
the function to call for each element, which should return true when the desired element is found; or `NULL` to use pointer equality |
| haystack |
the pointer array to be searched |
| index_ |
the return location for the index of the element, if found |
|
true if |