for_each


Description:

[ CCode ( cname = "g_hash_table_foreach" ) ]
public void for_each (HFunc<K,V> func)

Calls the given function for each of the key/value pairs in the GenericSet.

The function is passed the key and value of each pair, and the given user_data parameter. The hash table may not be modified while iterating over it (you can't add/remove items). To remove all items matching a predicate, use foreach_remove.

The order in which for_each iterates over the keys/values in the hash table is not defined.

See find for performance caveats for linear order searches in contrast to @get.

Parameters:

func

the function to call for each key/value pair

hash_table

a GenericSet

user_data

user data to pass to the function