Rune
struct Rune
A Rune instance that represents the Unicode replacement character U+FFFD.
Returns true if and only if this scalar value is ASCII ([ U+0000..U+007F ])
and therefore representable by a single UTF-8 code unit.
Returns true if and only if this scalar value is within the BMP ([ U+0000..U+FFFF ])
and therefore representable by a single UTF-16 code unit.
Returns the length in code units ( Char) of the
UTF-16 sequence required to represent this scalar value.
Returns the Unicode scalar value as an integer.
Creates a Rune from the provided Unicode scalar value.
Creates a Rune from the provided Unicode scalar value.
public static OperationStatus DecodeFromUtf16(ReadOnlySpan<char> source, out Rune result, out int charsConsumed)
Decodes the Rune at the beginning of the provided UTF-16 source buffer.
public static OperationStatus DecodeFromUtf8(ReadOnlySpan<byte> source, out Rune result, out int bytesConsumed)
Decodes the Rune at the beginning of the provided UTF-8 source buffer.
Attempts to create a Rune from the provided input value.
Attempts to create a Rune from the provided UTF-16 surrogate pair.
Returns false if the input values don't represent a well-formed UTF-16surrogate pair.
Encodes this Rune to a UTF-16 destination buffer.
Encodes this Rune to a destination buffer as UTF-8 bytes.