C Collections

cstring · Section 3

cstr_set

cstr_set - replace the full content, and call ccol__fatal_err() on failure

C Collections (libccollections, -lccollections)

#include <ccollections/cstring.h>
 
cstr_set(s, str);

This macro calls cstring_set(), and when that call gives anything other
than ccol_success it calls ccol__fatal_err().

s     cstr to change
str   New content (must not be NULL)

If you want to handle an error yourself, call cstring_set() directly.

cstring_set(3), cstr_append(3), cstr_reset(3)