C Collections

chashmap · Section 3

chashmap_size

chashmap_size - get the number of elements in the hash map

C Collections (libccollections, -lccollections)

#include <ccollections/chashmap.h>
 
size_t chashmap_size(chmap chm);

Returns the number of key-value pairs that the hash map holds right
now.

chm   Hash map to query

The number of elements in the map

O(1) complexity
Asserts if chm is NULL

chashmap_insert_elem(3), chashmap_remove_elem(3)