Rune

Rune struct

Represents a Unicode scalar value ([ U+0000..U+D7FF ], inclusive; or [ U+E000..U+10FFFF ], inclusive). It should be allocated on stack and passed to functions by value or by reference.

class Rune

Methods

MethodDescription
static Buffers::OperationStatus DecodeFromUtf16(ReadOnlySpan<char16_t>, Rune&, int32_t&)Decodes the Rune at the beginning of the provided UTF-16 source buffer.
static Buffers::OperationStatus DecodeFromUtf8(ReadOnlySpan<uint8_t>, Rune&, int32_t&)Decodes the Rune at the beginning of the provided UTF-8 source buffer.
Rune()Constructs a default Rune representing U+0000.
Rune(int32_t)Creates a Rune from the provided Unicode scalar value.
Rune(uint32_t)Creates a Rune from the provided Unicode scalar value.
static bool TryCreate(char16_t, Rune&)Attempts to create a Rune from the provided UTF-16 code unit.
static bool TryCreate(char16_t, char16_t, Rune&)Attempts to create a Rune from the provided UTF-16 surrogate pair.
bool TryEncodeToUtf8(Span<uint8_t>, int32_t&)Encodes this Rune to a UTF-8 destination buffer.

See Also