cgul_char_cxx Class Reference

C++ bindings for cgul_char More...

#include <cgul_char_cxx.h>

Collaboration diagram for cgul_char_cxx:
Collaboration graph

Static Public Member Functions

static int strcmp (const char *s1, const char *s2)
 
static int isspace (char c)
 

Detailed Description

This class provides the C++ bindings for C cgul_char external functions. The main purpose of this class is to convert the C-style function calls and exception handling in cgul_char into C++-style function calls and exception handling.

Member Function Documentation

§ strcmp()

static int cgul_char_cxx::strcmp ( const char *  s1,
const char *  s2 
)
inlinestatic

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_cxx; 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.

Parameters
[in]s1left-hand side
[in]s2right-hand side
Returns
-1, 0, or 1 if s1 is less than, equal to, or greater than s2 respectively
See also
cgul_string_cxx::compare()

References cgul_char__strcmp().

§ isspace()

static int cgul_char_cxx::isspace ( char  c)
inlinestatic

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'

Parameters
[in]ccharacter
Returns
whether the character is white-space

References cgul_char__isspace().


The documentation for this class was generated from the following file: