utilArrayBinarySearch

fnvoid * 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

arraythe sorted input array
numElementsnumber of elements in the array
elementSizesize of every element in bytes
searchFuncfunction to compare two elements, search_data will always be passed as second argument
modesearch mode that should be used
searchDataelement that should be found

Returns

The address of the found

element or null if nothing was found