cstring · Section 3
cstring_starts_with
NAME
cstring_starts_with - check whether the string begins with a prefix
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/cstring.h> bool cstring_starts_with(cstr s, const char *prefix);
DESCRIPTION
This function tells whether the content of s begins with prefix. An empty prefix always matches.
PARAMETERS
s String to test prefix Prefix to look for
RETURN VALUE
true if the string starts with prefix false if the string does not start with prefix, or if prefix is NULL
NOTES
Asserts if s is NULL