Rune Rune Rune Rune Struct

Definition

Represents a Unicode scalar value ([ U+0000..U+D7FF ], inclusive; or [ U+E000..U+10FFFF ], inclusive).

public value class Rune : IComparable<System::Text::Rune>, IEquatable<System::Text::Rune>
public struct Rune : IComparable<System.Text.Rune>, IEquatable<System.Text.Rune>
type Rune = struct
Public Structure Rune
Implements IComparable(Of Rune), IEquatable(Of Rune)
Inheritance
Implements

Remarks

This type's constructors and conversion operators validate the input, so consumers can call the APIs assuming that the underlying Rune instance is well-formed.

Constructors

Rune(Char) Rune(Char) Rune(Char) Rune(Char)

Creates a Rune from the provided UTF-16 code unit.

Rune(Int32) Rune(Int32) Rune(Int32) Rune(Int32)

Creates a Rune from the specified 32-bit integer that represents a Unicode scalar value.

Rune(UInt32) Rune(UInt32) Rune(UInt32) Rune(UInt32)

Creates a Rune from the specified 32-bit unsigned integer that represents a Unicode scalar value.

Rune(Char, Char) Rune(Char, Char) Rune(Char, Char) Rune(Char, Char)

Creates a Rune from the provided UTF-16 surrogate pair.

Properties

IsAscii IsAscii IsAscii IsAscii

Gets a value that indicates whether the scalar value associated with this Rune is within the ASCII encoding range.

IsBmp IsBmp IsBmp IsBmp

Gets a value that indicates whether the scalar value associated with this Rune is within the BMP encoding range.

Plane Plane Plane Plane

Gets the Unicode plane (0 to 16, inclusive) that contains this scalar.

ReplacementChar ReplacementChar ReplacementChar ReplacementChar

Gets a Rune instance that represents the Unicode replacement character U+FFFD.

Utf16SequenceLength Utf16SequenceLength Utf16SequenceLength Utf16SequenceLength

Gets the length in code units (Char) of the UTF-16 sequence required to represent this scalar value.

Utf8SequenceLength Utf8SequenceLength Utf8SequenceLength Utf8SequenceLength

Gets the length in code units of the UTF-8 sequence required to represent this scalar value.

Value Value Value Value

Gets the Unicode scalar value as an integer.

Methods

CompareTo(Rune) CompareTo(Rune) CompareTo(Rune) CompareTo(Rune)

Compares the current instance to the specified Rune instance.

DecodeFromUtf16(ReadOnlySpan<Char>, Rune, Int32) DecodeFromUtf16(ReadOnlySpan<Char>, Rune, Int32) DecodeFromUtf16(ReadOnlySpan<Char>, Rune, Int32) DecodeFromUtf16(ReadOnlySpan<Char>, Rune, Int32)

Decodes the Rune at the beginning of the provided UTF-16 source buffer.

DecodeFromUtf8(ReadOnlySpan<Byte>, Rune, Int32) DecodeFromUtf8(ReadOnlySpan<Byte>, Rune, Int32) DecodeFromUtf8(ReadOnlySpan<Byte>, Rune, Int32) DecodeFromUtf8(ReadOnlySpan<Byte>, Rune, Int32)

Decodes the Rune at the beginning of the provided UTF-8 source buffer.

DecodeLastFromUtf16(ReadOnlySpan<Char>, Rune, Int32) DecodeLastFromUtf16(ReadOnlySpan<Char>, Rune, Int32) DecodeLastFromUtf16(ReadOnlySpan<Char>, Rune, Int32) DecodeLastFromUtf16(ReadOnlySpan<Char>, Rune, Int32)

Decodes the Rune at the end of the provided UTF-16 source buffer.

DecodeLastFromUtf8(ReadOnlySpan<Byte>, Rune, Int32) DecodeLastFromUtf8(ReadOnlySpan<Byte>, Rune, Int32) DecodeLastFromUtf8(ReadOnlySpan<Byte>, Rune, Int32) DecodeLastFromUtf8(ReadOnlySpan<Byte>, Rune, Int32)

Decodes the Rune at the end of the provided UTF-8 source buffer.

EncodeToUtf16(Span<Char>) EncodeToUtf16(Span<Char>) EncodeToUtf16(Span<Char>) EncodeToUtf16(Span<Char>)

Encodes this Rune to a UTF-16 destination buffer.

EncodeToUtf8(Span<Byte>) EncodeToUtf8(Span<Byte>) EncodeToUtf8(Span<Byte>) EncodeToUtf8(Span<Byte>)

Encodes this Rune to a UTF-8 destination buffer.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Returns a value that indicates whether the current instance and a specified object are equal.

Equals(Rune) Equals(Rune) Equals(Rune) Equals(Rune)

Returns a value that indicates whether the current instance and a specified rune are equal.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Returns the hash code for this instance.

GetNumericValue(Rune) GetNumericValue(Rune) GetNumericValue(Rune) GetNumericValue(Rune)

Gets the numeric value associated with the specified rune.

GetRuneAt(String, Int32) GetRuneAt(String, Int32) GetRuneAt(String, Int32) GetRuneAt(String, Int32)

Gets the Rune that begins at a specified position in a string.

GetUnicodeCategory(Rune) GetUnicodeCategory(Rune) GetUnicodeCategory(Rune) GetUnicodeCategory(Rune)

Gets the Unicode category associated with the specified rune.

IsControl(Rune) IsControl(Rune) IsControl(Rune) IsControl(Rune)

Returns a value that indicates whether the specified rune is categorized as a control character.

IsDigit(Rune) IsDigit(Rune) IsDigit(Rune) IsDigit(Rune)

Returns a value that indicates whether the specified rune is categorized as a decimal digit.

IsLetter(Rune) IsLetter(Rune) IsLetter(Rune) IsLetter(Rune)

Returns a value that indicates whether the specified rune is categorized as a letter.

IsLetterOrDigit(Rune) IsLetterOrDigit(Rune) IsLetterOrDigit(Rune) IsLetterOrDigit(Rune)

Returns a value that indicates whether the specified rune is categorized as a letter or a decimal digit.

IsLower(Rune) IsLower(Rune) IsLower(Rune) IsLower(Rune)

Returns a value that indicates whether the specified rune is categorized as a lowercase letter.

IsNumber(Rune) IsNumber(Rune) IsNumber(Rune) IsNumber(Rune)

Returns a value that indicates whether the specified rune is categorized as a number.

IsPunctuation(Rune) IsPunctuation(Rune) IsPunctuation(Rune) IsPunctuation(Rune)

Returns a value that indicates whether the specified rune is categorized as a punctuation mark.

IsSeparator(Rune) IsSeparator(Rune) IsSeparator(Rune) IsSeparator(Rune)

Returns a value that indicates whether the specified rune is categorized as a separator character.

IsSymbol(Rune) IsSymbol(Rune) IsSymbol(Rune) IsSymbol(Rune)

Returns a value that indicates whether the specified rune is categorized as a symbol character.

IsUpper(Rune) IsUpper(Rune) IsUpper(Rune) IsUpper(Rune)

Returns a value that indicates whether the specified rune is categorized as an uppercase letter.

IsValid(Int32) IsValid(Int32) IsValid(Int32) IsValid(Int32)

Returns a value that indicates whether a 32-bit signed integer represents a valid Unicode scalar value; that is, it is in the range [ U+0000..U+D7FF ], inclusive; or [ U+E000..U+10FFFF ], inclusive.

IsValid(UInt32) IsValid(UInt32) IsValid(UInt32) IsValid(UInt32)

Returns a value that indicates whether a 32-bit unsigned integer represents a valid Unicode scalar value; that is, it is in the range [ U+0000..U+D7FF ], inclusive, or [ U+E000..U+10FFFF ], inclusive.

IsWhiteSpace(Rune) IsWhiteSpace(Rune) IsWhiteSpace(Rune) IsWhiteSpace(Rune)

Returns a value that indicates whether the specified rune is categorized as a white space character.

ToLower(Rune, CultureInfo) ToLower(Rune, CultureInfo) ToLower(Rune, CultureInfo) ToLower(Rune, CultureInfo)

Returns a copy of the specified Rune converted to lowercase, using the casing rules of the specified culture.

ToLowerInvariant(Rune) ToLowerInvariant(Rune) ToLowerInvariant(Rune) ToLowerInvariant(Rune)

Returns a copy of the specified Rune converted to lowercase using the casing rules of the invariant culture.

ToString() ToString() ToString() ToString()

Returns the string representation of this Rune instance.

ToUpper(Rune, CultureInfo) ToUpper(Rune, CultureInfo) ToUpper(Rune, CultureInfo) ToUpper(Rune, CultureInfo)

Returns a copy of the specified Rune converted to uppercase, using the casing rules of the specified culture.

ToUpperInvariant(Rune) ToUpperInvariant(Rune) ToUpperInvariant(Rune) ToUpperInvariant(Rune)

Returns a copy of the specified Rune converted to uppercase using the casing rules of the invariant culture.

TryCreate(Char, Rune) TryCreate(Char, Rune) TryCreate(Char, Rune) TryCreate(Char, Rune)

Attempts to create a Rune from a specified character and returns a value that indicates whether the operation succeeded.

TryCreate(Int32, Rune) TryCreate(Int32, Rune) TryCreate(Int32, Rune) TryCreate(Int32, Rune)

Attempts to create a Rune from a specified signed integer that represents a Unicode scalar value.

TryCreate(UInt32, Rune) TryCreate(UInt32, Rune) TryCreate(UInt32, Rune) TryCreate(UInt32, Rune)

Attempts to create a Rune from the specified 32-bit unsigned integer that represents a Unicode scalar value.

TryCreate(Char, Char, Rune) TryCreate(Char, Char, Rune) TryCreate(Char, Char, Rune) TryCreate(Char, Char, Rune)

Attempts to create a Rune from the specified UTF-16 surrogate pair and returns a value that indicates whether the operation was successful.

TryEncodeToUtf16(Span<Char>, Int32) TryEncodeToUtf16(Span<Char>, Int32) TryEncodeToUtf16(Span<Char>, Int32) TryEncodeToUtf16(Span<Char>, Int32)

Encodes this Rune to a UTF-16 encoded destination buffer.

TryEncodeToUtf8(Span<Byte>, Int32) TryEncodeToUtf8(Span<Byte>, Int32) TryEncodeToUtf8(Span<Byte>, Int32) TryEncodeToUtf8(Span<Byte>, Int32)

Encodes this Rune to a UTF-8 encoded destination buffer.

TryGetRuneAt(String, Int32, Rune) TryGetRuneAt(String, Int32, Rune) TryGetRuneAt(String, Int32, Rune) TryGetRuneAt(String, Int32, Rune)

Attempts to get the Rune that begins at a specified position in a string, and return a value that indicates whether the operation succeeded.

Operators

Equality(Rune, Rune) Equality(Rune, Rune) Equality(Rune, Rune) Equality(Rune, Rune)

Returns a value that indicates whether two Rune instances are equal.

Explicit(Char to Rune) Explicit(Char to Rune) Explicit(Char to Rune) Explicit(Char to Rune)

Defines an explicit conversion of a 16-bit Unicode character to a Rune.

Explicit(Int32 to Rune) Explicit(Int32 to Rune) Explicit(Int32 to Rune) Explicit(Int32 to Rune)

Defines an explicit conversion of a 32-bit signed integer to a Rune.

Explicit(UInt32 to Rune) Explicit(UInt32 to Rune) Explicit(UInt32 to Rune) Explicit(UInt32 to Rune)

Defines an explicit conversion of a 32-bit unsigned integer to a Rune.

GreaterThan(Rune, Rune) GreaterThan(Rune, Rune) GreaterThan(Rune, Rune) GreaterThan(Rune, Rune)

Returns a value indicating whether a specified Rune is greater than another specified Rune.

GreaterThanOrEqual(Rune, Rune) GreaterThanOrEqual(Rune, Rune) GreaterThanOrEqual(Rune, Rune) GreaterThanOrEqual(Rune, Rune)

Returns a value indicating whether a specified Rune is greater than or equal to another specified Rune.

Inequality(Rune, Rune) Inequality(Rune, Rune) Inequality(Rune, Rune) Inequality(Rune, Rune)

Returns a value that indicates whether two Rune instances have different values.

LessThan(Rune, Rune) LessThan(Rune, Rune) LessThan(Rune, Rune) LessThan(Rune, Rune)

Returns a value indicating whether a specified Rune is less than another specified Rune.

LessThanOrEqual(Rune, Rune) LessThanOrEqual(Rune, Rune) LessThanOrEqual(Rune, Rune) LessThanOrEqual(Rune, Rune)

Returns a value indicating whether a specified Rune is less than or equal to another specified Rune.

Applies to