HashTableC is an implementation of a fully-featured, open-addressed, double hashed, and auto-resizing hash table in pure C.
#include "hashtable.h"
int main(void)
{
// Create a new hashtable
ht_hashtable *table = ht_new_table();
// Insert Key-Value Pair
ht_insert(table, "k", "v");
// Search for Key (Returns NULL if not found)
char *value = ht_search(ht, "search_key");
// Remove Key-Value Pair
ht_remove(ht, "key");
// Delete Table
ht_delete_table(table);
}
This project is released under the GPL 3. For more information, see the LICENSE
file.