![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <StrChar.h>
Static Public Member Functions | |
static constexpr bool | IsAscii (wchar_t ch) noexcept |
static constexpr bool | IsPrint (wchar_t ch) noexcept |
static bool | IsAlNum (wchar_t ch) noexcept |
static bool | IsNL (wchar_t ch) noexcept |
static bool | IsSpace (wchar_t ch) noexcept |
static bool | IsSpaceX (wchar_t ch) noexcept |
static bool | IsDigit (wchar_t ch) noexcept |
static bool | IsUpperA (wchar_t ch) noexcept |
static bool | IsLowerA (wchar_t ch) noexcept |
static bool | IsAlphaA (wchar_t ch) noexcept |
static bool | IsUpperAXSet (wchar_t ch) noexcept |
static bool | IsLowerAXSet (wchar_t ch) noexcept |
static bool | IsAlphaUSet (wchar_t ch) noexcept |
static bool | IsUpperUSet (wchar_t ch) noexcept |
static bool | IsLowerUSet (wchar_t ch) noexcept |
static bool | IsUpperAX (wchar_t ch) noexcept |
static bool | IsLowerAX (wchar_t ch) noexcept |
static bool | IsUpper (wchar_t ch) noexcept |
static bool | IsLower (wchar_t ch) noexcept |
static bool | IsAlpha (wchar_t ch) noexcept |
static bool | IsCSymF (wchar_t ch) noexcept |
static bool | IsCSym (wchar_t ch) noexcept |
static wchar_t | ToUpperA (wchar_t ch) noexcept |
static wchar_t | ToUpperW (wchar_t ch) noexcept |
static wchar_t | ToLowerA (wchar_t ch) noexcept |
static wchar_t | ToLowerW (wchar_t ch) noexcept |
static COMPARE_t | CmpI (char a, char b) noexcept |
static COMPARE_t | CmpI (wchar_t a, wchar_t b) noexcept |
static int | Dec2U (wchar_t ch) noexcept |
static bool __stdcall | IsDigitF (wchar_t ch) |
static bool __stdcall | IsDigitX (wchar_t ch, RADIX_t uRadix=0x10) |
static bool __stdcall | IsVowel (wchar_t ch) |
static char __stdcall | U2Hex (UINT uVal) |
static int __stdcall | Hex2U (wchar_t ch) |
static char __stdcall | U2Radix (UINT uVal, RADIX_t uRadix=10) |
static int __stdcall | Radix2U (wchar_t ch, RADIX_t uRadix=10) |
Static Public Attributes | |
static const char | k_BEL = '\a' |
Audible bell = 7. More... | |
static const char | k_BS = '\b' |
Backspace = 8. More... | |
static const char | k_HT = '\t' |
Horizontal tab = 9. More... | |
static const char | k_NL = '\n' |
New line, line feed = 0x0a = 10. More... | |
static const char | k_VT = '\v' |
Vertical tab = 0x0b = 11. More... | |
static const char | k_FF = '\f' |
Form feed, new page = 0x0c = 12. More... | |
static const char | k_CR = '\r' |
Carriage return = 0x0d = 13. More... | |
static const char | k_Space = ' ' |
space = start of the visible ASCII set. 0x20 = 32 More... | |
static const char | k_ASCII = 127 |
Max for normal ASCII characters. More... | |
static const RADIX_t | k_uRadixMin = 2 |
binary More... | |
static const RADIX_t | k_uRadixDef = 10 |
base 10. More... | |
static const RADIX_t | k_uRadixMax = 10 + 26 |
numbers + letters. More... | |
static const char | k_Vowels [5] = { 'a', 'e', 'i', 'o', 'u' } |
Does not include Y. AEIOU. More... | |
static const BYTE | k_AXU = 0xC0 |
extended ASCII Upper. NOT UTF8 More... | |
static const BYTE | k_AXL = 0xE0 |
extended ASCII Lower. NOT UTF8 More... | |
Friends | |
class | StrCharTests |
Replace some of the std lib char functions because they can crash on chars outside range. POSIX linux and _WIN32 calls are not always the same. ASSUME ASCII char set, extended ASCII, UNICODE or UTF8
|
inlinestaticnoexcept |
Compare 2 characters ignoring case. Are they the same ignoring case ?
|
inlinestaticnoexcept |
Compare 2 characters ignoring case. Are they the same ignoring case ?
|
inlinestaticnoexcept |
Get decimal digit value.
|
static |
same as Radix2U(ch,16) Get the value from the hex char -1 = invalid char.
|
inlinestaticnoexcept |
a-z, 0-9
|
inlinestaticnoexcept |
_isalpha() isalpha() for English/ASCII set. NOT numeric or other. _WIN32 IsCharAlpha()
|
inlinestaticnoexcept |
_isalpha() isalpha()
|
inlinestaticnoexcept |
_isalpha() UNICODE set
|
inlinestaticconstexprnoexcept |
like POSIX isascii()
|
inlinestaticnoexcept |
Would this be a valid 'c' symbolic name ? __iscsym or __iscsymf
|
inlinestaticnoexcept |
Would this be a valid 'c' symbolic name ? __iscsym or __iscsymf (first char)
|
inlinestaticnoexcept |
same as C isdigit()
is digit in uRadix range? or Hex digit (if uRadix=16). replaces isxdigit() and istxdigit()
|
inlinestaticnoexcept |
islower(ch) in UNICODE
|
inlinestaticnoexcept |
islower(ch) in base ASCII set
|
inlinestaticnoexcept |
islower(ch) in extended ASCII set.
|
inlinestaticnoexcept |
islower(ch) = 'à' 'ý' // extended ASCII. NOT UTF8
|
inlinestaticnoexcept |
Unicode set. odd if lower case.
|
inlinestaticnoexcept |
is newline.
|
inlinestaticconstexprnoexcept |
printable? k_ASCII is not printable = DEL.
|
inlinestaticnoexcept |
is a horizontal separator space. not newline.
|
inlinestaticnoexcept |
Is this any sort of spacer ? Horizontal or vertical space or new lines. almost same as C isspace() = "' ','\t','\n'" etc. but we also include "'\b'" https://en.wikipedia.org/wiki/Newline NEL: Next Line, U + 0085 LS : Line Separator, U + 2028 PS : Paragraph Separator, U + 2029
|
inlinestaticnoexcept |
isupper(ch) in UNICODE
|
inlinestaticnoexcept |
isupper(ch) in base ASCII set
|
inlinestaticnoexcept |
isupper(ch) in extended ASCII set.
|
inlinestaticnoexcept |
isupper(ch) = 'À' 'Ý' // extended ASCII. NOT UTF8
|
inlinestaticnoexcept |
Unicode set. even is upper case.
|
inlinestaticnoexcept |
replace std::tolower() for ASCII // ch|0x20 sort of
|
inlinestaticnoexcept |
std::tolower() for UNICODE
|
inlinestaticnoexcept |
replace std::toupper() for ASCII
|
inlinestaticnoexcept |
std::toupper() for UNICODE
|
static |
same as U2Radix(uVal,16) Convert a value to a single hex char. "0123456789ABCDEF"[uVal] Upper case. '?' = invalid value.
|
friend |
|
static |
Max for normal ASCII characters.
|
static |
extended ASCII Lower. NOT UTF8
|
static |
extended ASCII Upper. NOT UTF8
|
static |
Audible bell = 7.
|
static |
Backspace = 8.
|
static |
Carriage return = 0x0d = 13.
|
static |
Form feed, new page = 0x0c = 12.
|
static |
Horizontal tab = 9.
|
static |
New line, line feed = 0x0a = 10.
|
static |
space = start of the visible ASCII set. 0x20 = 32
|
static |
base 10.
|
static |
numbers + letters.
|
static |
binary
|
static |
Does not include Y. AEIOU.
|
static |
Vertical tab = 0x0b = 11.