cstring · Section 3
cstring_at
NAME
cstring_at - return the character at a given index
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/cstring.h> char cstring_at(cstr s, size_t idx);
DESCRIPTION
This function returns the character at the zero-based index idx. For an index that is out of bounds it returns '\0' instead of asserting.
PARAMETERS
s String to query idx Zero-based character index
RETURN VALUE
The character at idx, or '\0' if idx >= length
NOTES
Asserts if s is NULL