System.Text.Rune
Represents a Unicode scalar value ([ U+0000..U+D7FF ], inclusive; or [ U+E000..U+10FFFF ], inclusive).
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 Unicode plane (0 to 16, inclusive) which contains this scalar.
Returns the length in code units ( Char) of the
UTF-16 sequence required to represent this scalar value.
Returns the length in code units of the
UTF-8 sequence required to represent this scalar value.
Returns the Unicode scalar value as an integer.
Creates a Rune from the provided UTF-16 code unit.
Creates a Rune from the provided UTF-16 surrogate pair.
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.
public static OperationStatus DecodeLastFromUtf16(ReadOnlySpan<char> source, out Rune result, out int charsConsumed)
Decodes the Rune at the end of the provided UTF-16 source buffer.
public static OperationStatus DecodeLastFromUtf8(ReadOnlySpan<byte> source, out Rune value, out int bytesConsumed)
Decodes the Rune at the end of the provided UTF-8 source buffer.
Returns true iff value is a valid Unicode scalar
value, i.e., is in [ U+0000..U+D7FF ], inclusive; or [ U+E000..U+10FFFF ], inclusive.
Returns true iff value is a valid Unicode scalar
value, i.e., is in [ U+0000..U+D7FF ], inclusive; or [ U+E000..U+10FFFF ], inclusive.
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.
Attempts to create a Rune from the provided input value.
Attempts to create a Rune from the provided input value.
Encodes this Rune to a UTF-16 destination buffer.
Encodes this Rune to a UTF-8 destination buffer.
Returns a value that indicates whether the current instance and a specified rune are equal using the specified comparison option.
Encodes this Rune to a UTF-16 destination buffer.
Encodes this Rune to a destination buffer as UTF-8 bytes.