Wrapper for a 32-bit code point value that can be encoded as UTF-8.
More...
#include <unicodeUtils.h>
|
constexpr | TfUtf8CodePoint ()=default |
| Construct a code point initialized to the replacement value.
|
|
constexpr | TfUtf8CodePoint (uint32_t value) |
| Construct a UTF-8 valued code point, constrained by the maximum value and surrogate range.
|
|
constexpr uint32_t | AsUInt32 () const |
|
|
static constexpr uint32_t | ReplacementValue = 0xFFFD |
| Code points that cannot be decoded or are outside of the valid range will be replaced with this value.
|
|
static constexpr uint32_t | MaximumValue = 0x10FFFF |
| Values higher than this will be replaced with the replacement code point.
|
|
static constexpr std::pair< uint32_t, uint32_t > | SurrogateRange = {0xD800, 0xDFFF} |
| Values in this range (inclusive) cannot be constructed and will be replaced by the replacement code point.
|
|
Wrapper for a 32-bit code point value that can be encoded as UTF-8.
std::stringstream s;
constexpr TfUtf8CodePoint()=default
Construct a code point initialized to the replacement value.
A single TfUtf8CodePoint
may be converted to a string using TfStringify
as well.
Definition at line 36 of file unicodeUtils.h.
◆ TfUtf8CodePoint() [1/2]
Construct a code point initialized to the replacement value.
◆ TfUtf8CodePoint() [2/2]
Construct a UTF-8 valued code point, constrained by the maximum value and surrogate range.
Definition at line 56 of file unicodeUtils.h.
◆ AsUInt32()
constexpr uint32_t AsUInt32 |
( |
| ) |
const |
|
inlineconstexpr |
◆ operator!=
◆ operator==
◆ MaximumValue
constexpr uint32_t MaximumValue = 0x10FFFF |
|
staticconstexpr |
Values higher than this will be replaced with the replacement code point.
Definition at line 44 of file unicodeUtils.h.
◆ ReplacementValue
constexpr uint32_t ReplacementValue = 0xFFFD |
|
staticconstexpr |
Code points that cannot be decoded or are outside of the valid range will be replaced with this value.
Definition at line 40 of file unicodeUtils.h.
◆ SurrogateRange
constexpr std::pair<uint32_t, uint32_t> SurrogateRange = {0xD800, 0xDFFF} |
|
staticconstexpr |
Values in this range (inclusive) cannot be constructed and will be replaced by the replacement code point.
Definition at line 49 of file unicodeUtils.h.
The documentation for this class was generated from the following file: