cstring · Section 3
cstring_reset
NAME
cstring_reset - clear all characters and shrink capacity to minimum
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/cstring.h> void cstring_reset(cstr s);
DESCRIPTION
This function sets the length to zero and then tries to shrink the buffer back to the minimum capacity of 16 bytes. If that reallocation fails the capacity stays as it was, but the length becomes zero either way.
PARAMETERS
s String to reset
NOTES
Asserts if s is NULL