Classes | |
| class | validator |
| Provides streaming UTF8 validation functionality. More... | |
Functions | |
| uint32_t | decode (uint32_t *state, uint32_t *codep, uint8_t byte) |
| Decode the next byte of a UTF8 sequence. More... | |
| bool | validate (std::string const &s) |
| Validate a UTF8 string. More... | |
Variables | |
| static unsigned int const | utf8_accept = 0 |
| State that represents a valid utf8 input sequence. More... | |
| static unsigned int const | utf8_reject = 1 |
| State that represents an invalid utf8 input sequence. More... | |
| static uint8_t const | utf8d [] |
| Lookup table for the UTF8 decode state machine. More... | |
|
inline |
Decode the next byte of a UTF8 sequence.
| [out] | state | The decoder state to advance |
| [out] | codep | The codepoint to fill in |
| [in] | byte | The byte to input |
Definition at line 69 of file utf8_validator.hpp.
References utf8_accept.
Referenced by websocketpp::utf8_validator::validator::consume(), websocketpp::utf8_validator::validator::decode(), ndn::lp::Packet::get(), and ndn::lp::Packet::list().
|
inline |
Validate a UTF8 string.
convenience function that creates a validator, validates a complete string and returns the result.
Definition at line 143 of file utf8_validator.hpp.
References websocketpp::utf8_validator::validator::complete(), and websocketpp::utf8_validator::validator::decode().
Referenced by websocketpp::close::extract_reason(), websocketpp::processor::hybi00< stub_config >::prepare_data_frame(), and websocketpp::processor::hybi13< stub_config >::prepare_data_frame().
|
static |
State that represents a valid utf8 input sequence.
Definition at line 40 of file utf8_validator.hpp.
Referenced by websocketpp::utf8_validator::validator::complete(), decode(), and websocketpp::utf8_validator::validator::reset().
|
static |
State that represents an invalid utf8 input sequence.
Definition at line 42 of file utf8_validator.hpp.
|
static |
Lookup table for the UTF8 decode state machine.
Definition at line 45 of file utf8_validator.hpp.