Struct TextRange
- Namespace
- Avalonia.Media.TextFormatting
- Assembly
- Avalonia.Base.dll
References a portion of a text buffer.
public readonly struct TextRange : IEquatable<TextRange>
- Implements
- Inherited Members
Constructors
TextRange(int, int)
public TextRange(int start, int length)
Parameters
Properties
End
Gets the end.
public int End { get; }
Property Value
- int
The end.
Length
Gets the length.
public int Length { get; }
Property Value
- int
The length.
Start
Gets the start.
public int Start { get; }
Property Value
- int
The start.
Methods
Equals(TextRange)
public bool Equals(TextRange other)
Parameters
other
TextRange
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
Skip(int)
Bypasses a specified number of elements in the slice and then returns the remaining elements.
public TextRange Skip(int length)
Parameters
length
intThe number of elements to skip before returning the remaining elements.
Returns
- TextRange
A TextRange that contains the elements that occur after the specified index in this slice.
Take(int)
Returns a specified number of contiguous elements from the start of the slice.
public TextRange Take(int length)
Parameters
length
intThe number of elements to return.
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(TextRange, TextRange)
public static bool operator ==(TextRange left, TextRange right)
Parameters
Returns
operator !=(TextRange, TextRange)
public static bool operator !=(TextRange left, TextRange right)