My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members

The libhash library

A small librairy that offers some function to manipulate easily strings, lists, binary trees or hash tables. It's written in C and a C++ wrapper is also provided.

Synopsis

List usage

header lh/list.h

    lh_list_t *l;

    l = lh_list_create(NULL, (lh_cmp_hdlr_t) strcmp);
    lh_list_add(l, "ddd");
    lh_list_add(l, "zzz");
    lh_list_add(l, "aaa");
    lh_list_sort(l);

Hash map usage

header lh/hash.h

    lh_hash_t* h;

    h = lh_hash_screate(1000, NULL);
    lh_hash_sset(h, "key", "value");
    lh_hash_sset(h, "other", "other value");
Powered by Google Project Hosting