Compares two variable length strings¶
ss_string_cmp is a function defined in ssstring.c.
Synopsis:
-
int
ss_string_cmp(const ss_string_t *s1, const ss_string_t *s2)¶
Description: This function is similar to memcmp but its arguments are variable length strings instead.
Return Value: Returns -1 if the value of S1 is less than S2, 1 if S1 is greater than S2, and zero if they are equal in
value. Returns -2 on failure (beware that this is a refinement of the more general negative returns on
failure used throughout SSlib). It is an error if S1 or S2 is a null pointer, but not if either or both have
no associated value. Lack of a value is less than any other value and if S1 and S2 both lack a value they are
considered equal.
Parallel Notes: Independent
See Also:
- Strings: Introduction for current chapter