C Collections

cstring · Section 3

cstring_append

cstring_append - append a C string to the end

C Collections (libccollections, -lccollections)

#include <ccollections/cstring.h>
 
ccol_retval cstring_append(cstr s, const char *str);

This function appends the null-terminated C string str to the end of s,
growing the internal buffer when it needs more room.

s     String to change
str   C string to append (must not be NULL)

ccol_success              - The append succeeded
ccol_invalid_args         - str is NULL
ccol_container_full       - The result overflows a size_t
ccol_not_enough_memory    - The reallocation failed

Asserts if s is NULL

cstring_prepend(3), cstring_insert(3), cstring_set(3)