header_utils
|
Functions that operate on codepoints and strings encoded as ASCII. More...
Functions | |
template<stringable T> | |
constexpr bool | ghassanpl::string_ops::ascii::is_identifier (T const &str) noexcept |
Returns true if the given str is a C-style identifier (e.g. matches /[\w_][\w_0-9]+/ ) | |
template<stringable T> | |
constexpr std::string | ghassanpl::string_ops::ascii::tolower (T const &str) noexcept |
Returns a copy of the string with all characters transformed to lower case. | |
constexpr std::string | ghassanpl::string_ops::ascii::tolower (std::string str) noexcept |
Returns a copy of the string with all characters transformed to lower case. | |
constexpr std::string | ghassanpl::string_ops::ascii::tolower (const char *str) noexcept |
Returns a copy of the string with all characters transformed to lower case. | |
template<stringable T> | |
std::string | ghassanpl::string_ops::ascii::toupper (T const &str) noexcept |
Returns a copy of the string with all characters transformed to upper case. | |
std::string | ghassanpl::string_ops::ascii::toupper (std::string str) noexcept |
Returns a copy of the string with all characters transformed to upper case. | |
std::string | ghassanpl::string_ops::ascii::toupper (const char *str) noexcept |
Returns a copy of the string with all characters transformed to upper case. | |
std::string | ghassanpl::string_ops::ascii::capitalize (std::string str) noexcept |
Returns a copy of the string with the first letter transformed to upper case if possible. | |
constexpr char32_t | ghassanpl::string_ops::ascii::number_to_digit (int v) noexcept |
Convert a number between 0 and 9 to its ASCII representation (only gives meaningful results with arguments between 0 and 9) | |
constexpr char32_t | ghassanpl::string_ops::ascii::number_to_xdigit (int v) noexcept |
Convert a number between 0 and 15 to its ASCII representation (only gives meaningful results with arguments between 0 and 15) | |
constexpr int | ghassanpl::string_ops::ascii::digit_to_number (char32_t cp) noexcept |
Convert an ASCII digit character to its numerical value (only gives meaningful results with valid digit arguments) | |
constexpr int | ghassanpl::string_ops::ascii::xdigit_to_number (char32_t cp) noexcept |
Convert an ASCII xdigit to its numerical value (only gives meaningful results with valid xdigit arguments) | |
Functions that operate on codepoints and strings encoded as ASCII.
|
inlinenoexcept |
Returns a copy of the string with the first letter transformed to upper case if possible.
Definition at line 445 of file string_ops.h.
Convert an ASCII digit character to its numerical value (only gives meaningful results with valid digit arguments)
Definition at line 457 of file string_ops.h.
|
constexprnoexcept |
Returns true if the given str
is a C-style identifier (e.g. matches /[\w_][\w_0-9]+/
)
Definition at line 389 of file string_ops.h.
Definition at line 330 of file string_ops.h.
Definition at line 326 of file string_ops.h.
Definition at line 338 of file string_ops.h.
Definition at line 337 of file string_ops.h.
Definition at line 327 of file string_ops.h.
Definition at line 339 of file string_ops.h.
Definition at line 331 of file string_ops.h.
Definition at line 332 of file string_ops.h.
Definition at line 335 of file string_ops.h.
Definition at line 328 of file string_ops.h.
Definition at line 340 of file string_ops.h.
Definition at line 334 of file string_ops.h.
Definition at line 333 of file string_ops.h.
Definition at line 336 of file string_ops.h.
Definition at line 329 of file string_ops.h.
|
constexpr |
Definition at line 503 of file string_ops.h.
|
constexpr |
Definition at line 509 of file string_ops.h.
Convert a number between 0 and 9 to its ASCII representation (only gives meaningful results with arguments between 0 and 9)
Definition at line 452 of file string_ops.h.
Convert a number between 0 and 15 to its ASCII representation (only gives meaningful results with arguments between 0 and 15)
Definition at line 454 of file string_ops.h.
|
noexcept |
A version of the sv
suffix that returns a special type allowing for case-insensitive comparisons.
Definition at line 530 of file string_ops.h.
|
constexpr |
Definition at line 498 of file string_ops.h.
|
constexpr |
Definition at line 474 of file string_ops.h.
|
constexpr |
Definition at line 480 of file string_ops.h.
|
constexpr |
Definition at line 489 of file string_ops.h.
|
constexpr |
Definition at line 469 of file string_ops.h.
|
constexpr |
Definition at line 464 of file string_ops.h.
Definition at line 345 of file string_ops.h.
Returns a copy of the string with all characters transformed to lower case.
Definition at line 413 of file string_ops.h.
|
constexprnoexcept |
Returns a copy of the string with all characters transformed to lower case.
Definition at line 407 of file string_ops.h.
|
constexprnoexcept |
Returns a copy of the string with all characters transformed to lower case.
Definition at line 396 of file string_ops.h.
Definition at line 342 of file string_ops.h.
Returns a copy of the string with all characters transformed to upper case.
Definition at line 438 of file string_ops.h.
|
inlinenoexcept |
Returns a copy of the string with all characters transformed to upper case.
Definition at line 432 of file string_ops.h.
|
inlinenoexcept |
Returns a copy of the string with all characters transformed to upper case.
Definition at line 421 of file string_ops.h.
Convert an ASCII xdigit to its numerical value (only gives meaningful results with valid xdigit arguments)
Definition at line 460 of file string_ops.h.
All characters that match ascii::isalpha
.
Definition at line 370 of file string_ops.h.
All characters that match ascii::isalnum
.
Definition at line 374 of file string_ops.h.
All characters that match ascii::isblank
.
Definition at line 382 of file string_ops.h.
All characters that match ascii::iscntrl
.
Definition at line 381 of file string_ops.h.
All characters that match ascii::isdigit
.
Definition at line 371 of file string_ops.h.
All characters that match ascii::isgraph
.
Definition at line 383 of file string_ops.h.
All characters that match ascii::isxdigit
.
Definition at line 373 of file string_ops.h.
All characters that match ascii::isident
.
Definition at line 375 of file string_ops.h.
All characters that match ascii::isidentstart
.
Definition at line 376 of file string_ops.h.
All characters that match ascii::islower
.
Definition at line 379 of file string_ops.h.
All characters that match ascii::isodigit
.
Definition at line 372 of file string_ops.h.
All characters that match ascii::isprint
.
Definition at line 384 of file string_ops.h.
All characters that match ascii::ispunct
.
Definition at line 378 of file string_ops.h.
All characters that match ascii::isupper
.
Definition at line 380 of file string_ops.h.
All characters that match ascii::isspace
.
Definition at line 377 of file string_ops.h.