Photon Common Library 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::string_utils::table Namespace Reference

Variables

constexpr std::string_view common_whitespaces = " \n\r\t"
 Commonly used whitespace characters.
 
constexpr std::string_view standard_whitespaces = " \n\r\t\v\f"
 Standard whitespace characters.
 
constexpr std::array< unsigned char, 256 > ASCII_TO_UPPER
 
constexpr std::array< unsigned char, 256 > ASCII_TO_LOWER
 
constexpr std::array< unsigned char, 62 > BASE62_DIGITS
 

Variable Documentation

◆ ASCII_TO_LOWER

std::array<unsigned char, 256> ph::string_utils::table::ASCII_TO_LOWER
inlineconstexpr

Table for mapping standard ASCII character codes to lower case, i.e., A~Z are mapped to a~z (a~z are also mapped to a~z itself, so a case check can be eliminated). Any other codes will be left unchanged.

◆ ASCII_TO_UPPER

std::array<unsigned char, 256> ph::string_utils::table::ASCII_TO_UPPER
inlineconstexpr

Table for mapping standard ASCII character codes to upper case, i.e., a~z are mapped to A~Z (A~Z are also mapped to A~Z itself, so a case check can be eliminated). Any other codes will be left unchanged.

◆ BASE62_DIGITS

std::array<unsigned char, 62> ph::string_utils::table::BASE62_DIGITS
inlineconstexpr
Initial value:
=
{{
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D',
'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',
'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
'U', 'V', 'W', 'X', 'Y', 'Z'
}}

◆ common_whitespaces

std::string_view ph::string_utils::table::common_whitespaces = " \n\r\t"
inlineconstexpr

Commonly used whitespace characters.

Ordered from high frequency to low frequency (approximated).

◆ standard_whitespaces

std::string_view ph::string_utils::table::standard_whitespaces = " \n\r\t\v\f"
inlineconstexpr

Standard whitespace characters.

Should idealy contain characters ch that satisfy std::isspace(ch) == true.