|
bool | mtcore::ascii::is_digit (const char c) |
| Checks if a character is an ASCII digit (0-9)
|
|
bool | mtcore::ascii::is_hex (const char c) |
| Checks if a character is an ASCII hex digit (0-9, a-f, A-F)
|
|
bool | mtcore::ascii::is_hex_str (Slice< const char > str) |
| Checks if a string is composed of only hex characters Will return false if string is empty.
|
|
bool | mtcore::ascii::is_int_str (Slice< const char > str) |
| Checks if a string is composed of only integer characters Will return false if string is empty.
|
|
bool | mtcore::ascii::is_pos_int_str (Slice< const char > str) |
| Checks if a string is composed of only positive integer characters Will return false if string is empty.
|
|
template<typename Out = i32> |
Result< Out, AsciiNumericParseError > | mtcore::ascii::hex_to_int (const Slice< const char > &parse) |
| Tries to parse an ASCII hex string into an integer Will return an error if the parsed string does not fit.
|
|
template<typename Out = i32> |
Result< Out, AsciiNumericParseError > | mtcore::ascii::base10_to_int (const Slice< const char > &parse) |
| Tries to parse an ASCII numeric string into an integer Will return an error if the parsed string does not fit.
|
|
Result< char, UnescapeError > | mtcore::ascii::unescape_char (Slice< const char > str, char escapeChar='\\') |
| Unescapes the first (potentially) escaped character in a character sequence If the sequence is empty, will return an error.
|
|
template<typename Writer> |
Result< size_t, std::variant< typename Writer::ErrType, UnescapeError > > | mtcore::ascii::write_unescaped (Writer &writer, Slice< const char > str, char escapeChar='\\') |
| Writes unescaped ASCII characters to a stream Note: This does NOT support writing Unicode escape codes at this time (so \uhhhh or \Uhhhhhhhh)
|
|