Holds attributes, including Unicode code point, of a one multi-byte UTF-8 character with the read_u8_char_data function. More...
#include <chsvstringex.h>
Public Member Functions | |
u8_ch_data ()=default | |
The default constructor. More... | |
constexpr bool | valid () const noexcept |
Checks whether the object holds a valid UTF-8 character value or a special value used to indicate that the object is not associated with any character. More... | |
constexpr ucp_t | code () const noexcept |
Returns a code point of the held UTF-8 character as defined by the Unicode 11.0 standard, or INVALID_UNICODE_CODE_POINT if the u8_ch_data object is not associated with any valid UTF-8 code. More... | |
constexpr std::size_t | size () const noexcept |
Returns a byte size of the original UTF-8 code the read_u8_char_data was constructed from. More... | |
Protected Member Functions | |
constexpr | u8_ch_data (ucp_t val, std::size_t cb) noexcept |
Constructs the object with explicit assignment of the code point and the byte size. More... | |
Holds attributes, including Unicode code point, of a one multi-byte UTF-8 character with the read_u8_char_data function.
The class is introduced to facilitate conversions of UTF-8 characters to Unicode 11.0 code points implemented with ucp_t to hold extra information about the multi-byte UTF-8 code retrieved by the read_u8_char_data function on the fly.