Iterator.findCustom

Find the first element in @it that matches the compare function @func. @func should return 0 when the element is found. The first parameter to @func will be the current element of the iterator and the second parameter will be @user_data. The result will be stored in @elem if a result is found.

The iterator will not be freed.

This function will return %FALSE if an error happened to the iterator or if the element wasn't found.

class Iterator
bool
findCustom

Parameters

func GCompareFunc

the compare function to use

elem Value

pointer to a #GValue where to store the result

userData void*

user data passed to the compare function

Return Value

Type: bool

Returns %TRUE if the element was found, else %FALSE.

MT safe.

Meta