C Collections

cstring · Section 3

cstring_length

cstring_length - return the number of characters in the string

C Collections (libccollections, -lccollections)

#include <ccollections/cstring.h>
 
size_t cstring_length(cstr s);

This function returns the number of characters stored in the string,
without the terminating null byte.

s   String to query

The length in bytes, without the null terminator

Asserts if s is NULL

cstring_is_empty(3), cstring_c_str(3)