axl main logo
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
axl_bool axl_hash_exists ( axlHash hash,
axlPointer  key 

Allows to check if the provided key is found on the given hash table.

The function allows to get if the key is found on the table pretty much the behaviour that we could get using the following:

1 // just compare if the provided key returns some value
2 axl_bool value = (axl_hash_get (hash, "key2") != NULL);

However it could happen that the value associated to the key, which already exists, is a NULL pointer, making previous comparation to not work in all cases. This function allows to check for the existance of a key and its associated data no mather what is the value of the associated data.

hashThe hash table to check for a key value.
keyThe key to check for its existance.
axl_true if the key is found, otherwise axl_false is returned.

Referenced by axl_node_has_attribute().