Cross-Platform C++

ot
class UnicodeCharacterType

#include "ot/base/UnicodeCharacterType.h"

Class module for determining the characteristics of a given Unicode character. This class mirrors some of the facilities provided by the standard C++ library. However, care must be taken to ensure that a Unicode locale is being used before relying on these. The motivations for the existence of this class are:




Method Summary
static bool IsAlphaNumeric(UCharType ch)
         Tests if the Unicode character represented by the single CharType ch is an alpha-numeric character[a-z], [A-Z], [0-9].
static bool IsAscii(UCharType ch)
         Tests if the Unicode character represented by the single CharType ch is an ASCII character (0-0x7F).
static bool IsDigit(UCharType ch)
         Tests if the Unicode character represented by the single CharType ch is an ASCII decimal digit 0-9.
static bool IsHexDigit(UCharType ch)
         Tests if the Unicode character represented by the single CharType ch is an ASCII hexadecimal digit [0-9], [A-F], [a-f].
static bool IsSpace(UCharType ch)
         Tests if the Unicode character represented by the single CharType ch is white-space according to common Windows and Unix conventions.

Method Detail

IsAlphaNumeric

static bool IsAlphaNumeric(UCharType ch)
Tests if the Unicode character represented by the single CharType ch is an alpha-numeric character[a-z], [A-Z], [0-9].

Returns:
true if this Character is an alpha-numeric character; false otherwise.

IsAscii

static bool IsAscii(UCharType ch)
Tests if the Unicode character represented by the single CharType ch is an ASCII character (0-0x7F).

Returns:
true if this Character is an ASCII character; false otherwise.

IsDigit

static bool IsDigit(UCharType ch)
Tests if the Unicode character represented by the single CharType ch is an ASCII decimal digit 0-9.

Returns:
true if this Character is a decimal digit [0-9]; false otherwise.

IsHexDigit

static bool IsHexDigit(UCharType ch)
Tests if the Unicode character represented by the single CharType ch is an ASCII hexadecimal digit [0-9], [A-F], [a-f].

Returns:
true if this Character is a hexadecimal digit; false otherwise.

IsSpace

static bool IsSpace(UCharType ch)
Tests if the Unicode character represented by the single CharType ch is white-space according to common Windows and Unix conventions. Space characters are:-

Returns:
true if ch is a space character; false otherwise.


Cross-Platform C++

Found a bug or missing feature? Please email us at support@elcel.com

Copyright © 2000-2003 ElCel Technology   Trademark Acknowledgements