_lv_utils_bsearch() function
DEFINES TYPEDEFS STATIC PROTOTYPES STATIC VARIABLES MACROS GLOBAL FUNCTIONS Searches base[0] to base[n - 1] for an item that matches *key.
Syntax
void * _lv_utils_bsearch(const void * key,
const void * base,
uint32_t n,
uint32_t size,
int32_t (*cmp)(const void * pRef, const void * pElement));
Arguments
key
Pointer to item being searched for
base
Pointer to first element to search
cmp
Pointer to comparison function (see #unicode_list_compare as a comparison function example)
Return value
a pointer to a matching item, or NULL if none exists.
Notes
The function cmp must return negative if its first argument (the search key) is less than its second (a table entry), zero if equal, and positive if greater. Items in the array must be in ascending order.