Base Framework
|
ASCII character traits. More...
#include <base/string/ASCIITraits.h>
Classes | |
struct | CharacterDescriptor |
class | Compare |
Comparison of characters function object. More... | |
class | CompareCaseless |
Case-less comparison of characters function object. More... | |
class | ToLowerCase |
Lower case conversion function object. More... | |
class | ToUpperCase |
Upper case conversion function object. More... | |
Public Types | |
enum | Characteristics { LOWER = 1, UPPER = 2, ALPHA = LOWER|UPPER, DIGIT = 4, ALPHANUM = ALPHA|DIGIT, OCTAL = 8, LOWERHEX = 16, UPPERHEX = 32, HEX = LOWERHEX|UPPERHEX, CONTROL = 64, SPACE = 128, ASCII = 256, SP = 512, PUNCTUATION = 1024, GRAPH = ALPHANUM|PUNCTUATION, PRINTABLE = SP|GRAPH } |
Static Public Member Functions | |
static bool | isAlpha (char value) noexcept |
static bool | isAlphaNum (char value) noexcept |
static bool | isLower (char value) noexcept |
static bool | isUpper (char value) noexcept |
static bool | isDigit (char value) noexcept |
static bool | isOctal (char value) noexcept |
static bool | isLowerHex (char value) noexcept |
static bool | isUpperHex (char value) noexcept |
static bool | isHexDigit (char value) noexcept |
static bool | isSpace (char value) noexcept |
static bool | isPunctuation (char value) noexcept |
static bool | isPrintable (char value) noexcept |
static bool | isGraph (char value) noexcept |
static bool | isControl (char value) noexcept |
static bool | isASCII (char value) noexcept |
static unsigned char | digitToValue (char value) noexcept |
static char | valueToDigit (unsigned int value) noexcept |
static char | valueToDigit (unsigned int value, bool upper) noexcept |
static char | valueToLowerDigit (unsigned int value) noexcept |
static char | valueToUpperDigit (unsigned int value) noexcept |
static char | toLower (char value) noexcept |
static char | toUpper (char value) noexcept |
static int | compare (char left, char right) noexcept |
static int | compareCaseless (char left, char right) noexcept |
Static Public Attributes | |
static const char | LOWER_DIGITS [] |
static const char | UPPER_DIGITS [] |
static const char | NUL = '\0' |
static const char | SOH = 0x01 |
static const char | STX = 0x02 |
static const char | ETX = 0x03 |
static const char | EOT = 0x04 |
static const char | ENQ = 0x05 |
static const char | ACK = 0x06 |
static const char | BEL = '\a' |
static const char | BS = '\b' |
static const char | HT = '\t' |
static const char | LF = '\n' |
static const char | VT = '\v' |
static const char | FF = '\f' |
static const char | CR = '\r' |
static const char | SO = 0x0e |
static const char | SI = 0x0f |
static const char | DLE = 0x10 |
static const char | DC1 = 0x11 |
static const char | DC2 = 0x12 |
static const char | DC3 = 0x13 |
static const char | DC4 = 0x14 |
static const char | NAK = 0x15 |
static const char | SYN = 0x16 |
static const char | ETB = 0x17 |
static const char | CAN = 0x18 |
static const char | EM = 0x19 |
static const char | SUB = 0x1a |
static const char | ESC = 0x1b |
static const char | FS = 0x1c |
static const char | GS = 0x1d |
static const char | RS = 0x1e |
static const char | US = 0x1f |
static const char | SPC = ' ' |
static const char | DEL = 0x7f |
ASCII character traits.
This class is a wrapper for the 7-bit ASCII octet manipulators and more. This class does not depend on the current locale of the application.
Character characteristics.
|
inlinestaticnoexcept |
Compares the specified characters (less than (negative), equal (0), and greater than (positive).
|
inlinestaticnoexcept |
Compares the specified characters ignoring the case (less than (negative), equal (0), and greater than (positive).
|
inlinestaticnoexcept |
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.
|
inlinestaticnoexcept |
Returns true if the character an alphabetic character.
|
inlinestaticnoexcept |
Returns true if the character an alphabetic character or a digit.
|
inlinestaticnoexcept |
Returns true if the character is an ASCII character (i.e. the octets from 0x00 to 0x7f).
|
inlinestaticnoexcept |
Returns true if the character is a control character (the octets from 0x00 to 0x1f).
|
inlinestaticnoexcept |
Returns true if the character is a digit.
|
inlinestaticnoexcept |
Returns true if the character is a visible character.
|
inlinestaticnoexcept |
Returns true if the character is a hex digit (either lower or upper hex digit).
|
inlinestaticnoexcept |
Returns true if the character is lowercase.
|
inlinestaticnoexcept |
Returns true if the character is a lower hex digit (any of the characters "0123456789abcdef").
|
inlinestaticnoexcept |
Returns true if the character is an octal digit.
|
inlinestaticnoexcept |
Returns true if the character is printable.
|
inlinestaticnoexcept |
Returns true if the character is a punctuation mark.
|
inlinestaticnoexcept |
Returns true if the character is a white space (tab '\t', newline '\n', vertical-tab '\v', form-feed '\f', carriage-return '\r', and space ' ').
|
inlinestaticnoexcept |
Returns true if the character is uppercase.
|
inlinestaticnoexcept |
Returns true if the character is an upper hex digit (any of the characters "0123456789ABCDEF").
|
inlinestaticnoexcept |
Returns the lower case representation of the character.
|
inlinestaticnoexcept |
Returns the upper case representation of the character.
|
inlinestaticnoexcept |
Returns the character representation of the specified value. An unspecified value is returned if the argument falls outside the range [0..15].
|
inlinestaticnoexcept |
Returns the character representation of the specified value. An unspecified value is returned if the argument falls outside the range [0..15].
value | The value of the digit. |
upper | Selects upper case if true otherwise lower case. |
|
inlinestaticnoexcept |
Returns the character representation of the specified value. An unspecified value is returned if the argument falls outside the range [0..15].
|
inlinestaticnoexcept |
Returns the character representation of the specified value. An unspecified value is returned if the argument falls outside the range [0..15].
|
static |
Array of all digits (lower case) in ascending order of corresponding value.
|
static |
Array of all digits (upper case) in ascending order of corresponding value.