cstring · Section 3
cstring_compare
NAME
cstring_compare - compare the string to a C string
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/cstring.h> int cstring_compare(cstr s, const char *str);
DESCRIPTION
This function compares the content of s with the null-terminated C string str, the same way strcmp() does.
PARAMETERS
s String to compare str C string to compare against
RETURN VALUE
A negative value if s < str Zero if s == str A positive value if s > str 1 if str is NULL, since the library treats any string that is not NULL as greater than NULL
NOTES
Asserts if s is NULL
SEE ALSO
cstring_equals(3), cstring_starts_with(3), cstring_ends_with(3)