libdonut
2.3.2
Application framework for cross-platform game development in C++20
|
Classes | |
class | UTF8Iterator |
Iterator type for decoding Unicode code points from a UTF-8 string, wrapping an existing iterator for UTF-8 code units. More... | |
struct | EncodeUTF8FromCodePointResult |
Result of the encodeUTF8FromCodePoint() function. More... | |
struct | UTF8Sentinel |
Sentinel type for UTF8Iterator. More... | |
class | UTF8Iterator< It, Sentinel > |
Specialization of UTF8Iterator that works even for input iterators. More... | |
class | UTF8View |
Non-owning view type for decoding Unicode code points from a contiguous UTF-8 string. More... | |
Functions | |
constexpr bool | isValidCodePoint (char32_t codePoint) noexcept |
Check if a 32-bit unsigned integer value falls within the valid ranges for a Unicode code point. More... | |
template<typename InputIt , typename Sentinel > | |
constexpr std::pair< char32_t, InputIt > | decodeCodePointFromUTF8 (InputIt it, Sentinel end) |
Decode a single Unicode code point from an iterator of UTF-8 code units in a UTF-8-encoded string. More... | |
constexpr EncodeUTF8FromCodePointResult | encodeUTF8FromCodePoint (char32_t codePoint) noexcept |
Encode a Unicode code point into a sequence of UTF-8 code units. More... | |
Variables | |
constexpr char32_t | CODE_POINT_ERROR {0xFFFFFFFF} |
Invalid code point value, used as a return value in Unicode decoding algorithms for conveying encoding errors. More... | |
|
constexprnoexcept |
Check if a 32-bit unsigned integer value falls within the valid ranges for a Unicode code point.
codePoint | 32-bit code point value to check. |
|
constexpr |
Decode a single Unicode code point from an iterator of UTF-8 code units in a UTF-8-encoded string.
it | input iterator to a sequence of UTF-8 code units. The expression *it++ must be convertible to char8_t. |
end | end iterator or sentinel that marks the end of the UTF-8 code unit sequence. |
any | exception thrown by the iterator implementation. |
|
constexprnoexcept |
Encode a Unicode code point into a sequence of UTF-8 code units.
codePoint | code point to encode. |
|
inlineconstexpr |
Invalid code point value, used as a return value in Unicode decoding algorithms for conveying encoding errors.