C Collections

cyaml · Section 3

cyaml_list_size

cyaml_list_size - return the number of elements in a list

C Collections (libccollections, -lccollections)

#include <ccollections/cyaml.h>
 
size_t cyaml_list_size(cyaml node);

Returns the number of child nodes of the CYAML_LIST node.  The
function calls ccol__fatal_err() when node is NULL and when node is
not of type CYAML_LIST.

The number of elements, which is 0 for an empty list.

cyaml_list_get(3), cyaml_list_push(3)