Skip to main content

TextRange Struct

Definition

Assembly:Avalonia.Base
Package:Avalonia

References a portion of a text buffer.

public struct TextRange

Inheritance: ValueType -> TextRange

Implements: IEquatable<TextRange>

Constructors

NameDescription
TextRangeNo summary available.

TextRange Constructor

public TextRange(int start, int length)

Parameters

start int

length int

Methods

NameDescription
Equals (2 overloads)No summary available.
GetHashCodeNo summary available.
SkipBypasses a specified number of elements in the slice and then returns the remaining elements.
TakeReturns a specified number of contiguous elements from the start of the slice.
ToStringNo summary available.

Equals overloads

Equals Method

public bool Equals(Avalonia.Media.TextFormatting.TextRange other)
Parameters

other Avalonia.Media.TextFormatting.TextRange

Returns

bool

Equals Method

public bool Equals(object obj)
Parameters

obj object

Returns

bool

GetHashCode Method

public int GetHashCode()

Returns

int

Skip Method

Bypasses a specified number of elements in the slice and then returns the remaining elements.

public Avalonia.Media.TextFormatting.TextRange Skip(int length)

Parameters

length int

The number of elements to skip before returning the remaining elements.

Returns

Avalonia.Media.TextFormatting.TextRange

A Avalonia.Media.TextFormatting.TextRange that contains the elements that occur after the specified index in this slice.

Take Method

Returns a specified number of contiguous elements from the start of the slice.

public Avalonia.Media.TextFormatting.TextRange Take(int length)

Parameters

length int

The number of elements to return.

Returns

Avalonia.Media.TextFormatting.TextRange

A Avalonia.Media.TextFormatting.TextRange that contains the specified number of elements from the start of this slice.

ToString Method

public string ToString()

Returns

string

Properties

NameDescription
EndGets the end.
LengthGets the length.
StartGets the start.

End Property

Gets the end.

public int End { get; set; }

Value

The end.

Length Property

Gets the length.

public int Length { get; set; }

Value

The length.

Start Property

Gets the start.

public int Start { get; set; }

Value

The start.