UnicodeScriptRun Struct

Represents a range of a text that is written in one script.

public readonly struct UnicodeScriptRun : IEquatable<UnicodeScriptRun>
Implements

Properties

NameDescription
IndexGets the index of the first UTF-16 code unit of the run.
LengthGets the number of UTF-16 code units of the run.
ScriptGets the script of the run. It is UnicodeScript.Common when no character of the run belongs to a script.

Gets the index of the first UTF-16 code unit of the run.

public int Index { get; }

Property value

int

Gets the number of UTF-16 code units of the run.

public int Length { get; }

Property value

int

Gets the script of the run. It is UnicodeScript.Common when no character of the run belongs to a script.

public UnicodeScript Script { get; }

Property value

UnicodeScript

Methods

NameDescription
Equals(UnicodeScriptRun)Indicates whether the current object is equal to another object of the same type.
Equals(object?)Indicates whether this instance and a specified object are equal.
GetHashCode()Returns the hash code for this instance.

Equals overloads

Equals(UnicodeScriptRun)

UnicodeScriptRun.cs

Indicates whether the current object is equal to another object of the same type.

public bool Equals(UnicodeScriptRun other)
Parameters
other UnicodeScriptRun
An object to compare with this object.
Returns

bool true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

UnicodeScriptRun.cs

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)
Parameters
obj object?
The object to compare with the current instance.
Returns

bool true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

UnicodeScriptRun.cs

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int A 32-bit signed integer that is the hash code for this instance.

Operators

NameDescription
operator ==(UnicodeScriptRun, UnicodeScriptRun)Determines whether two values are equal.
operator !=(UnicodeScriptRun, UnicodeScriptRun)Determines whether two values are different.

operator ==(UnicodeScriptRun, UnicodeScriptRun)

UnicodeScriptRun.cs

Determines whether two values are equal.

public static bool operator ==(UnicodeScriptRun left, UnicodeScriptRun right)

Parameters

left UnicodeScriptRun
The first value.
right UnicodeScriptRun
The second value.

Returns

bool true when the values are equal.

operator !=(UnicodeScriptRun, UnicodeScriptRun)

UnicodeScriptRun.cs

Determines whether two values are different.

public static bool operator !=(UnicodeScriptRun left, UnicodeScriptRun right)

Parameters

left UnicodeScriptRun
The first value.
right UnicodeScriptRun
The second value.

Returns

bool true when the values are different.