cstring · Section 3
cstr_split
NAME
cstr_split - split the string by a delimiter
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/cstring.h> cstr_split(s, delim, err);
DESCRIPTION
This macro forwards its arguments to cstring_split(). It returns a cvec of cstr tokens, and every token is a separate heap allocation.
PARAMETERS
s cstr to split delim Delimiter string (must not be NULL or empty) err Optional pointer to receive an error string on failure
RETURN VALUE
cvec of cstr tokens on success, NULL on failure
NOTES
You must destroy every cstr in the vector and then the vector itself