![]() |
ArkScript
A small, fast, functional and scripting language for video games
|
#include <utf8_char.hpp>
Public Types | |
using | codepoint_t = int |
using | length_t = unsigned char |
using | repr_t = std::array<unsigned char, 5> |
Public Member Functions | |
utf8_char_t () | |
utf8_char_t (const codepoint_t cp, const length_t len, const repr_t repr) | |
bool | isPrintable () const |
const char * | c_str () const |
std::size_t | size () const |
codepoint_t | codepoint () const |
Static Public Member Functions | |
static std::pair< std::string::iterator, utf8_char_t > | at (const std::string::iterator it, const std::string::iterator end) |
Parse a codepoint and compute its length and representation. | |
Private Attributes | |
codepoint_t | m_codepoint |
length_t | m_length |
repr_t | m_repr |
Definition at line 12 of file utf8_char.hpp.
using Ark::internal::utf8_char_t::codepoint_t = int |
Definition at line 15 of file utf8_char.hpp.
using Ark::internal::utf8_char_t::length_t = unsigned char |
Definition at line 16 of file utf8_char.hpp.
using Ark::internal::utf8_char_t::repr_t = std::array<unsigned char, 5> |
Definition at line 17 of file utf8_char.hpp.
|
inline |
Definition at line 19 of file utf8_char.hpp.
Referenced by at().
|
inline |
Definition at line 22 of file utf8_char.hpp.
|
inlinestatic |
Parse a codepoint and compute its length and representation.
https://github.com/sheredom/utf8.h/blob/4e4d828174c35e4564c31a9e35580c299c69a063/utf8.h#L1178
it | iterator in a string |
end | end iterator, used to avoid going out of bound |
Definition at line 32 of file utf8_char.hpp.
References utf8_char_t().
Referenced by Ark::internal::BaseParser::backtrack(), and Ark::internal::BaseParser::next().
|
inlinenodiscard |
Definition at line 92 of file utf8_char.hpp.
References m_repr.
Referenced by Ark::internal::BaseParser::accept(), and Ark::internal::BaseParser::expect().
|
inlinenodiscard |
Definition at line 94 of file utf8_char.hpp.
References m_codepoint.
Referenced by Ark::internal::BaseParser::accept(), and Ark::internal::BaseParser::expect().
|
inlinenodiscard |
Definition at line 85 of file utf8_char.hpp.
References m_codepoint.
Referenced by Ark::internal::BaseParser::next().
|
inlinenodiscard |
Definition at line 93 of file utf8_char.hpp.
References m_length.
Referenced by Ark::internal::BaseParser::next().
|
private |
Definition at line 97 of file utf8_char.hpp.
Referenced by codepoint(), and isPrintable().
|
private |
Definition at line 98 of file utf8_char.hpp.
Referenced by size().
|
private |
Definition at line 99 of file utf8_char.hpp.
Referenced by c_str().