https://github.com/basemax/hashmapc
A tiny library for using easily HashMap, arraylist in the C.
https://github.com/basemax/hashmapc
array arraylist arrays c hashmap hashmaps maplist
Last synced: about 2 months ago
JSON representation
A tiny library for using easily HashMap, arraylist in the C.
- Host: GitHub
- URL: https://github.com/basemax/hashmapc
- Owner: BaseMax
- License: gpl-3.0
- Created: 2019-03-08T22:03:32.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-09T19:15:04.000Z (almost 7 years ago)
- Last Synced: 2025-06-09T22:47:00.733Z (7 months ago)
- Topics: array, arraylist, arrays, c, hashmap, hashmaps, maplist
- Language: C
- Homepage:
- Size: 54.7 KB
- Stars: 21
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HashMap C
A tiny library for using easily HashMap, arraylist in the C.
### Functions
```c
void HashInit(HashMap *array);
void HashAdd(HashMap *array,PairValue *value);
void HashAppend(HashMap *array,HashMap *append);
void HashFreeIndex(HashMap *array,size_t index);
void HashFree(HashMap *array);
int HashDeleteIndex(HashMap *array,size_t index);
void HashDelete(HashMap *array);
PairValue *HashGetIndex(HashMap *array,size_t index);
PairValue *HashGetWithKey(HashMap *array,void *key);
void *HashGetKey(HashMap *array,void *value);
PairValue *HashGetWithValue(HashMap *array,void *value);
void *HashGetValue(HashMap *array,void *key);
PairValue *HashGetEquals(HashMap *array,PairValue *pair);
PairValue *HashGetEqual(HashMap *array,void *key,void *value);
```
### Includes
```c
#include
```
## Compile Example
**Clone :**
```
$ git clone https://github.com/BaseMax/HashMapC
$ cd HashMapC/
```
**Build Example :**
```
$ gcc example/main.c source/hashmap.c -o example/main
$ example/main
```
```
$ gcc source/hashmap.c -o source/hashmap -c -O3
$ gcc example/main.c source/hashmap -o example/main
$ example/main
```