find_custom


Description:

[ CCode ( simple_generics = true ) ]
public bool find_custom<T> (SearchFunc<Value?,T> func, out Value elem, T user_data)

Find the first element in this 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.

Parameters:

this

The Iterator to iterate

func

the compare function to use

elem

pointer to a Value where to store the result

user_data

user data passed to the compare function

Returns:




2022 vala-language.org