#include <base/string/Parser.h>
Inherited by JSON::JSONParser, and YAML::YAMLParser.
|
const uint8 * | src = nullptr |
|
const uint8 * | end = nullptr |
|
◆ Parser() [1/3]
◆ Parser() [2/3]
Parser::Parser |
( |
const uint8 * |
_src, |
|
|
const uint8 * |
_end |
|
) |
| |
|
inlinenoexcept |
◆ Parser() [3/3]
Parser::Parser |
( |
const String & |
text | ) |
|
|
inlinenoexcept |
◆ doesMatchPattern()
static bool Parser::doesMatchPattern |
( |
const String & |
pattern, |
|
|
const String & |
text |
|
) |
| |
|
staticnoexcept |
Returns true if the string matches the given pattern (using * and ?).
◆ getAvailable()
MemorySize Parser::getAvailable |
( |
| ) |
const |
|
inlinenoexcept |
Returns the available bytes.
◆ getCurrent()
const uint8* Parser::getCurrent |
( |
| ) |
const |
|
inlinenoexcept |
Returns the current marker.
◆ getNumberOfDigits()
unsigned int Parser::getNumberOfDigits |
( |
| ) |
const |
|
inlinenoexcept |
Returns the number of available digits.
◆ getUCS4Bytes()
unsigned int Parser::getUCS4Bytes |
( |
| ) |
const |
|
noexcept |
Returns the number of bytes in the next UTF-8 encoded char. Returns 0 for invalid encoding.
◆ hasMore()
bool Parser::hasMore |
( |
| ) |
const |
|
inlinenoexcept |
Returns true if more chars available.
◆ peek() [1/2]
char Parser::peek |
( |
| ) |
const |
|
inline |
Returns the next char without reading it.
◆ peek() [2/2]
bool Parser::peek |
( |
char |
ch | ) |
const |
|
inline |
Returns true if the next char is as expected without reading it.
◆ peekByte()
uint8 Parser::peekByte |
( |
| ) |
const |
|
inline |
Returns the next byte without reading it.
◆ peekUCS4()
ucs4 Parser::peekUCS4 |
( |
| ) |
const |
Peeks the next UCS4 character.
◆ read() [1/4]
◆ read() [2/4]
void Parser::read |
( |
char |
ch | ) |
|
|
inline |
◆ read() [3/4]
void Parser::read |
( |
const char * |
text | ) |
|
|
inline |
◆ read() [4/4]
void Parser::read |
( |
ucs4 |
ch | ) |
|
|
inline |
◆ readDigit()
unsigned int Parser::readDigit |
( |
| ) |
|
|
inline |
◆ readDigits()
unsigned int Parser::readDigits |
( |
unsigned int |
count | ) |
|
|
inline |
Reads n digits (up to 9).
◆ readUCS4()
ucs4 Parser::readUCS4 |
( |
| ) |
|
Returns the next UCS4 char assuming UTF8 encoding.
◆ skip()
◆ skipAny()
void Parser::skipAny |
( |
const char * |
chars | ) |
|
|
inline |
Skip any of the given chars until no more.
◆ skipJSONSpaces()
void Parser::skipJSONSpaces |
( |
| ) |
|
|
inline |
◆ skipUCS4()
void Parser::skipUCS4 |
( |
| ) |
|
|
inline |
Skips the next UTF-8 encoded character.
◆ unwind()