Struct TextPosition
- Namespace
- MiniTui
- Assembly
- MiniTui.dll
A position in a TextAreaState: a line, and a UTF-16 index into it on a grapheme cluster boundary.
public readonly record struct TextPosition : IComparable<TextPosition>, IEquatable<TextPosition>
- Implements
- Inherited Members
Constructors
TextPosition(int, int)
A position in a TextAreaState: a line, and a UTF-16 index into it on a grapheme cluster boundary.
public TextPosition(int Line, int Index)
Parameters
Properties
Index
public int Index { get; init; }
Property Value
Line
public int Line { get; init; }
Property Value
Methods
CompareTo(TextPosition)
Compare by line, then by index.
public int CompareTo(TextPosition other)
Parameters
otherTextPosition
Returns
Operators
operator >(TextPosition, TextPosition)
True if left comes after right.
public static bool operator >(TextPosition left, TextPosition right)
Parameters
leftTextPositionrightTextPosition
Returns
operator >=(TextPosition, TextPosition)
True if left comes after right or is the same.
public static bool operator >=(TextPosition left, TextPosition right)
Parameters
leftTextPositionrightTextPosition
Returns
operator <(TextPosition, TextPosition)
True if left comes before right.
public static bool operator <(TextPosition left, TextPosition right)
Parameters
leftTextPositionrightTextPosition
Returns
operator <=(TextPosition, TextPosition)
True if left comes before right or is the same.
public static bool operator <=(TextPosition left, TextPosition right)
Parameters
leftTextPositionrightTextPosition