Base Framework
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
WideTraits Class Reference

Wide-character description. More...

#include <base/string/WideString.h>

Classes

class  ToLowerCase
 
class  ToTitleCase
 
class  ToUpperCase
 

Public Types

enum  Characteristics {
  LETTER = 1, LOWER = 2, UPPER = 4, TITLE = 8,
  DIGIT = 16, CONTROL = 32, SPACE = 64, NEWLINE = 128,
  PUNCTUATION = 256
}
 

Public Member Functions

int digitToValue (ucs4 character) noexcept
 

Static Public Member Functions

static unsigned int getFlags (ucs4 character) noexcept
 
static bool isLetter (ucs4 character) noexcept
 
static bool isLetterDigit (ucs4 character) noexcept
 
static bool isLower (ucs4 character) noexcept
 
static bool isUpper (ucs4 character) noexcept
 
static bool isTitle (ucs4 character) noexcept
 
static bool isDigit (ucs4 character) noexcept
 
static bool isHexDigit (ucs4 character) noexcept
 
static bool isSpace (ucs4 character) noexcept
 
static bool isPunctuation (ucs4 character) noexcept
 
static bool isControl (ucs4 character) noexcept
 
static bool isASCII (ucs4 character) noexcept
 
static ucs4 toLower (ucs4 character) noexcept
 
static ucs4 toUpper (ucs4 character) noexcept
 
static ucs4 toTitle (ucs4 character) noexcept
 

Static Public Attributes

static constexpr ucs4 TERMINATOR = 0
 

Detailed Description

Wide-character description.

Default wide-character properties and manipulators.

Version
1.0

Member Enumeration Documentation

◆ Characteristics

Character characteristics.

Enumerator
LETTER 

Character is a letter (e.g. "a" or "A").

LOWER 

Character is lower cased.

UPPER 

Character is upper cased.

TITLE 

Character is title cased.

DIGIT 

Any of the characters "0123456789".

CONTROL 

The characters from 0x00 to 0x1f and 0x7f.

SPACE 

Tab, newline, vertical-tab, form-feed, carriage-return, and space.

NEWLINE 

Line separator.

PUNCTUATION 

Punctuation characters.

Member Function Documentation

◆ digitToValue()

int WideTraits::digitToValue ( ucs4  character)
noexcept

Returns the value of the specified character. The character must be a digit approved by isDigit(), isOctal(), isLowerHex(), isUpperHex(), or isHexDigit(). If the character is not a digit an unspecified value is returned.

◆ getFlags()

static unsigned int WideTraits::getFlags ( ucs4  character)
staticnoexcept

Returns the flags describing the specified character code.

◆ isASCII()

static bool WideTraits::isASCII ( ucs4  character)
inlinestaticnoexcept

Returns true if the character is an ASCII character.

◆ isControl()

static bool WideTraits::isControl ( ucs4  character)
staticnoexcept

Returns true if the character is a control character.

◆ isDigit()

static bool WideTraits::isDigit ( ucs4  character)
staticnoexcept

Returns true if the character is cased. Returns true if the character is a digit.

◆ isHexDigit()

static bool WideTraits::isHexDigit ( ucs4  character)
inlinestaticnoexcept

Returns true if the character is a hex digit.

◆ isLetter()

static bool WideTraits::isLetter ( ucs4  character)
inlinestaticnoexcept

Returns true if the character a letter.

◆ isLetterDigit()

static bool WideTraits::isLetterDigit ( ucs4  character)
inlinestaticnoexcept

Returns true if the character is a letter or a digit.

◆ isLower()

static bool WideTraits::isLower ( ucs4  character)
staticnoexcept

Returns true if the character is in lower case.

◆ isPunctuation()

static bool WideTraits::isPunctuation ( ucs4  character)
inlinestaticnoexcept

Returns true if the character is a punctuation mark.

◆ isSpace()

static bool WideTraits::isSpace ( ucs4  character)
staticnoexcept

Returns true if the character is a white space.

◆ isTitle()

static bool WideTraits::isTitle ( ucs4  character)
staticnoexcept

Returns true if the character is in title case.

◆ isUpper()

static bool WideTraits::isUpper ( ucs4  character)
staticnoexcept

Returns true if the character is in upper case.

◆ toLower()

static ucs4 WideTraits::toLower ( ucs4  character)
staticnoexcept

Maps the character to lower case.

◆ toTitle()

static ucs4 WideTraits::toTitle ( ucs4  character)
staticnoexcept

Maps the character to title case.

◆ toUpper()

static ucs4 WideTraits::toUpper ( ucs4  character)
staticnoexcept

Maps the character to upper case.

Member Data Documentation

◆ TERMINATOR

constexpr ucs4 WideTraits::TERMINATOR = 0
staticconstexpr

Specifies the terminator for NULL-terminated strings.