xentara-utils v2.0.4
The Xentara Utility Library
|
Functions | |
constexpr auto | isHighSurrogate (char16_t codeUnit) noexcept -> bool |
Determines if a UTF-16 code unit is a high surrogate. | |
constexpr auto | isLowSurrogate (char16_t codeUnit) noexcept -> bool |
Determines if a UTF-16 code unit is a low surrogate. | |
constexpr auto | isSurrogate (char16_t codeUnit) noexcept -> bool |
Determines if a UTF-16 code unit is a high or low surrogate. | |
constexpr auto | combineSurrogates (char16_t high, char16_t low) noexcept -> char32_t |
Combines a high and a low surrogate into a single code point. | |
constexpr auto | makeSurrogatePair (char32_t codePoint) noexcept -> std::array< char16_t, 2 > |
Splits a code point into high and low surrogates. | |
constexpr auto | isBmp (char32_t codePoint) noexcept -> bool |
Determines if a code point lies in the basic multilingual plane. | |
constexpr auto | isOutOfRange (char32_t codePoint) noexcept -> bool |
Determines if a code point is outside the valid range for Unicode scalar values. | |
constexpr auto | isReserved (char32_t codeUnit) noexcept -> bool |
Determines if a UTF-32 code unit is reserved for a high or a low surrogate. | |
constexpr auto | isIllegal (char32_t codePoint) noexcept -> bool |
Determines if a code point is not a legal Unicode scalar value. | |
constexpr auto | replacementCharacter () noexcept -> char32_t |
Returns the replacement character. | |
constexpr auto | isSingleByteUtf8 (char32_t codePoint) noexcept -> bool |
Determines if a code point encodes to a single UTF-8 code unit. | |
constexpr auto | isTwoByteUtf8 (char32_t codePoint) noexcept -> bool |
Determines if a code point encodes to a sequence of two UTF-8 code units. | |
constexpr auto | isThreeByteUtf8 (char32_t codePoint) noexcept -> bool |
Determines if a code point encodes to a sequence of three UTF-8 code units. | |
constexpr auto | isFourByteUtf8 (char32_t codePoint) noexcept -> bool |
Determines if a code point encodes to a sequence of four UTF-8 code units. | |
constexpr auto | isTwoByteUtf8OrLess (char32_t codePoint) noexcept -> bool |
Determines if a code point encodes to a sequence of two UTF-8 code units or less. | |
constexpr auto | isThreeByteUtf8OrLess (char32_t codePoint) noexcept -> bool |
Determines if a code point encodes to a sequence of three UTF-8 code units or less. | |
constexpr auto | isFourByteUtf8OrLess (char32_t codePoint) noexcept -> bool |
Determines if a code point encodes to a sequence of four UTF-8 code units or less. | |
constexpr auto | utf8Size (char32_t codePoint) noexcept -> std::size_t |
Determines how many UTF-8 code units are needed to encode a code point. | |
constexpr auto | utf16Size (char32_t codePoint) noexcept -> std::size_t |
Determines how many UTF-16 code units are needed to encode a code point. | |
|
constexprnoexcept |
Combines a high and a low surrogate into a single code point.
high | The high surrogate |
low | The low surrogate |
|
constexprnoexcept |
Determines if a code point lies in the basic multilingual plane.
The basic multilingual plane consists of all code points less than or equal to U+FFFF. These characters can be represented by a single UTF-16 code unit. Characters outside the basic multilingual plane must be split up into high and low surrogates.
codePoint | The code point |
|
constexprnoexcept |
Determines if a code point encodes to a sequence of four UTF-8 code units.
|
constexprnoexcept |
Determines if a code point encodes to a sequence of four UTF-8 code units or less.
This function can be used insead of isTwoByteUtf8() if it is already known that the code unit is not a three byte sequence or less, e.g. in chained if statements.
|
constexprnoexcept |
Determines if a UTF-16 code unit is a high surrogate.
codeUnit | The code unit |
|
constexprnoexcept |
Determines if a code point is not a legal Unicode scalar value.
codePoint | The code point |
|
constexprnoexcept |
Determines if a UTF-16 code unit is a low surrogate.
codeUnit | The code unit |
|
constexprnoexcept |
Determines if a code point is outside the valid range for Unicode scalar values.
codePoint | The code point |
|
constexprnoexcept |
Determines if a UTF-32 code unit is reserved for a high or a low surrogate.
codeUnit | The code unit |
|
constexprnoexcept |
Determines if a code point encodes to a single UTF-8 code unit.
|
constexprnoexcept |
Determines if a UTF-16 code unit is a high or low surrogate.
codeUnit | The code unit |
|
constexprnoexcept |
Determines if a code point encodes to a sequence of three UTF-8 code units.
|
constexprnoexcept |
Determines if a code point encodes to a sequence of three UTF-8 code units or less.
This function can be used insead of isTwoByteUtf8() if it is already known that the code unit is not a two byte sequence or less, e.g. in chained if statements.
|
constexprnoexcept |
Determines if a code point encodes to a sequence of two UTF-8 code units.
|
constexprnoexcept |
Determines if a code point encodes to a sequence of two UTF-8 code units or less.
This function can be used insead of isTwoByteUtf8() if it is already known that the code unit is not a single byte sequence, e.g. in chained if statements.
|
constexprnoexcept |
Splits a code point into high and low surrogates.
codePoint | The code point. Must be between U+10000 and U+10FFFF (supplementary planes). |
|
constexprnoexcept |
Returns the replacement character.
|
constexprnoexcept |
Determines how many UTF-16 code units are needed to encode a code point.
codePoint | The code point. Must be a legal Unicode scalar value (less than or equal to U+10FFFF, and not a surrogate). |
|
constexprnoexcept |
Determines how many UTF-8 code units are needed to encode a code point.
codePoint | The code point. Must be a legal Unicode scalar value (less than or equal to U+10FFFF, and not a surrogate). |