filter
Description:
[ CCode ( simple_generics = true ) ]
public Iterator filter<T> (SearchFunc<Value?,T> func, T user_data)
public Iterator filter<T> (SearchFunc<Value?,T> func, T user_data)
Create a new iterator from an existing iterator.
The new iterator will only return those elements that match the given compare function func. The first parameter that is passed
to func is the Value of the current iterator element and the second
parameter is user_data. func should return 0 for elements that should be included in the filtered iterator.
When this iterator is freed, this will also be freed.
Parameters:
| this |
The Iterator to filter |
| func |
the compare function to select elements |
| user_data |
user data passed to the compare function |
Returns:
|
a new Iterator. MT safe. |