cjson · Section 3
cjson_list_remove
NAME
cjson_list_remove - remove and free an element from an array node by index
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/cjson.h> ccol_retval cjson_list_remove(cjson arr, size_t index);
DESCRIPTION
Removes the element at position index from the array node arr and frees it together with everything below it. The elements after index move one position to the left, so the call costs O(n) in the number of elements that follow index.
RETURN VALUE
ccol_success - the element was removed and freed.
ccol_invalid_args - arr is NULL, arr is not a CJSON_LIST, or index
is out of bounds.
SEE ALSO
cjson_list_push(3), cjson_list_get(3), cjson_dictionary_remove(3)