RESTinio
|
Helper class for checking UTF-8 byte sequence during parsing URI or incoming byte stream. More...
#include <utf8_checker.hpp>
Public Member Functions | |
utf8_checker_t ()=default | |
RESTINIO_NODISCARD bool | process_byte (std::uint8_t byte) noexcept |
RESTINIO_NODISCARD bool | finalized () const noexcept |
void | reset () noexcept |
RESTINIO_NODISCARD std::uint32_t | current_symbol () const noexcept |
Private Types | |
enum class | state_t { valid , invalid , may_be_overlong , overlong } |
Private Member Functions | |
void | validate_current_symbol () noexcept |
void | check_overlong (std::uint8_t byte) noexcept |
Private Attributes | |
std::uint32_t | m_current_symbol = 0u |
std::size_t | m_current_symbol_rest_bytes = 0u |
state_t | m_state = state_t::valid |
Helper class for checking UTF-8 byte sequence during parsing URI or incoming byte stream.
Note: this class is moved to restinio::utils namespace in v.0.6.5.
Definition at line 34 of file utf8_checker.hpp.
|
strongprivate |
Enumerator | |
---|---|
valid | |
invalid | |
may_be_overlong | |
overlong |
Definition at line 198 of file utf8_checker.hpp.
|
default |
|
inlineprivatenoexcept |
Definition at line 149 of file utf8_checker.hpp.
|
inlinenoexcept |
Definition at line 134 of file utf8_checker.hpp.
|
inlinenoexcept |
Definition at line 120 of file utf8_checker.hpp.
|
inlinenoexcept |
Definition at line 41 of file utf8_checker.hpp.
|
inlinenoexcept |
Definition at line 126 of file utf8_checker.hpp.
|
inlineprivatenoexcept |
Definition at line 139 of file utf8_checker.hpp.
|
private |
Definition at line 194 of file utf8_checker.hpp.
|
private |
Definition at line 196 of file utf8_checker.hpp.
|
private |
Definition at line 206 of file utf8_checker.hpp.