Skip to content

jlagneau/libhashtable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libhashtable

travis build icon

This is a really simple hashtable library in C.


Installation

make && make test

There's no make install. Copy the file manually if you need to.

Simple use case

#include <libhashtable.h>

/*
** Create a function to delete your table content.
*/
void    delete(void *e)
{
    (void)e;
}

int     main(void)
{
    t_hashtable *h;

    h = ht_create(&delete);
    ht_set(h, "randomKey1", "Content");
    printf("%s\n", ht_get(h, "randomKey1"));
    ht_delete(&h);
    return (0);
}

For more advanced use cases, read the tests or source code.

About

A simple and static hashtable library in c

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published