Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
struct System.​Text.​Rune
Assembly: System.Runtime
Represents a Unicode scalar value ([ U+0000..U+D7FF ], inclusive; or [ U+E000..U+10FFFF ], inclusive).
Properties
public
bool
IsAscii
Gets a value that indicates whether the scalar value associated with this <see cref="T:System.Text.Rune" /> is within the ASCII encoding range.
public
bool
IsBmp
Gets a value that indicates whether the scalar value associated with this <see cref="T:System.Text.Rune" /> is within the BMP encoding range.
public
int
Plane
Gets the Unicode plane (0 to 16, inclusive) that contains this scalar.
public
int
Utf16SequenceLength
Gets the length in code units ( <see cref="T:System.Char" /> ) of the UTF-16 sequence required to represent this scalar value.
public
int
Utf8SequenceLength
Gets the length in code units of the UTF-8 sequence required to represent this scalar value.
public
int
Value
Gets the Unicode scalar value as an integer.
Methods
public
int
CompareTo​(Rune other)
other
The instance to compare with the current instance.
Returns A signed integer indicating the position of this instance in the sort order in relation to <paramref name="other" /> : <br /> - Less than zero: This instance precedes <paramref name="other" /> .
<br /> - Zero: The instance has the same position in the sort order as <paramref name="other" /> .
<br /> - Greater than zero: This instance follows <paramref name="other" /> .
Compares the current instance to the specified <see cref="T:System.Text.Rune" /> instance.
public
bool
Equals​(object obj)
obj
The object to compare with the current instance.
Returns <see langword="true" /> if <paramref name="obj" /> is of type <see cref="T:System.Text.Rune" /> and is equal to the current instance; otherwise, <see langword="false" /> .
Returns a value that indicates whether the current instance and a specified object are equal.
public
bool
Equals​(Rune other)
other
The object to compare with the current instance.
Returns <see langword="true" /> if the current instance and <paramref name="other" /> are equal; otherwise, <see langword="false" /> .
Returns a value that indicates whether the current instance and a specified rune are equal.
public
int
GetHashCode​() Returns The hash code for this instance.
Returns the hash code for this instance.
public
string
ToString​() Returns The string representation of this rune.
Returns the string representation of this <see cref="T:System.Text.Rune" /> instance.
protected
void
Finalize​()
Inherited from object
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
public
Type
GetType​()
Inherited from object
Returns The exact runtime type of the current instance.
Gets the <see cref="T:System.Type" /> of the current instance.
protected
object
MemberwiseClone​()
Inherited from object
Returns A shallow copy of the current <see cref="T:System.Object" /> .
Creates a shallow copy of the current <see cref="T:System.Object" /> .