cgul_wchar_cxx Class Reference

C++ bindings for cgul_wchar More...

#include <cgul_wchar_cxx.h>

Collaboration diagram for cgul_wchar_cxx:
Collaboration graph

Static Public Member Functions

static size_t wcslen (const cgul_wchar_t *ws)
 
static void wcscpy (cgul_wchar_t *dst, const cgul_wchar_t *src)
 
static int wcscmp (const cgul_wchar_t *ws1, const cgul_wchar_t *ws2)
 
static int isspace (cgul_wchar_t wc)
 

Detailed Description

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

Member Function Documentation

§ wcslen()

static size_t cgul_wchar_cxx::wcslen ( const cgul_wchar_t ws)
inlinestatic

This function returns the number of 32-bit wide-characters in ws. The return value is determined by counting all the wide characters that come before the trailing NUL wide character. The caller is responsible for insuring that ws is NUL-terminated.

Parameters
[in]ws32-bit wide-character string
Returns
number of 32-bit wide characters in ws

References cgul_wchar__wcslen().

§ wcscpy()

static void cgul_wchar_cxx::wcscpy ( cgul_wchar_t dst,
const cgul_wchar_t src 
)
inlinestatic

This function copies the 32-bit wide characters in src to dst. The caller is responsible for making sure that src is NUL-terminated and that dst is large enough to hold all the characters in src including the trailing NUL character.

Parameters
[in]dstdestination 32-bit wide-character string
[in]srcsource 32-bit wide-character string

References cgul_wchar__wcscpy().

§ wcscmp()

static int cgul_wchar_cxx::wcscmp ( const cgul_wchar_t ws1,
const cgul_wchar_t ws2 
)
inlinestatic

Perform a case-significant, 32-bit, wide-character string comparison of ws1 and ws2. Return -1, 0, or 1 if ws1 is less than, equal to, or greater than ws2 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.

Parameters
[in]ws1left-hand side
[in]ws2right-hand side
Returns
-1, 0, or 1 if ws1 is less than, equal to, or greater than ws2 respectively
See also
cgul_wstring__compare()

References cgul_wchar__wcscmp().

§ isspace()

static int cgul_wchar_cxx::isspace ( cgul_wchar_t  wc)
inlinestatic

Return whether the 32-bit, wide character wc 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]wc32-bit, wide character
Returns
whether the character is white-space

References cgul_wchar__isspace().


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