element or null if nothing was found
utilArrayBinarySearch
fn
void * utilArrayBinarySearch(void * array, uint numElements, size_t elementSize, glib.types.CompareDataFunc searchFunc, gst.types.SearchMode mode, const(void) * searchData = null)Searches inside array for search_data by using the comparison function search_func. array must be sorted ascending.
As search_data is always passed as second argument to search_func it's not required that search_data has the same type as the array elements.
The complexity of this search function is O(log (num_elements)).
Parameters
array | the sorted input array |
numElements | number of elements in the array |
elementSize | size of every element in bytes |
searchFunc | function to compare two elements, search_data will always be passed as second argument |
mode | search mode that should be used |
searchData | element that should be found |
Returns
The address of the found