cgul character support More...
Functions | |
CGUL_BEGIN_C CGUL_EXPORT int | cgul_char__strcmp (const char *s1, const char *s2) |
CGUL_EXPORT int | cgul_char__isspace (cgul_exception_t *cex, char c) |
This file defines the basic set of functions related to the char
type.
CGUL_BEGIN_C CGUL_EXPORT int cgul_char__strcmp | ( | const char * | s1, |
const char * | s2 | ||
) |
Perform a case-significant, 32-bit, string comparison of s1
and s2
. Return -1, 0, or 1 if s1
is less than, equal to, or greater than s2
respectively.
For simplicity, this function compares strings stricly by the ordinal value of each character which should be sufficient, for example, when comparing strings when inserting them as keys into a cgul_rbtree
; however, the comparison results are not likely to be the same as what strcoll()
would return if used on the UTF-8 version of the strings.
cgul_exception
object as its first parameter in order to make it easier to use the function as the comparison function of cgul_rbtree
objects. [in] | s1 | left-hand side |
[in] | s2 | right-hand side |
s1
is less than, equal to, or greater than s2
respectively Referenced by cgul_char_cxx::strcmp().
CGUL_EXPORT int cgul_char__isspace | ( | cgul_exception_t * | cex, |
char | c | ||
) |
Return whether the character c
is considered to be white-space. To avoid locale dependencies, white-space is defined as any character from the following list: ' ', '\t', '\n', '\r', '\f', '\v'
[in] | cex | c-style exception |
[in] | c | character |
Referenced by cgul_char_cxx::isspace().