Struct TextSpan
Namespace: Aspose.Html.Toolkit.Markdown.Syntax.Text
Assembly: Aspose.HTML.dll (25.2.0)
Represents the text span.
[ComVisible(true)]
public struct TextSpan : IEquatable<textspan>, IComparable<textspan>
Implements
IEquatable<textspan>, IComparable<textspan>
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
TextSpan(int, int)
Create the TextSpan
public TextSpan(int start, int length)
Parameters
start
int
The start.
length
int
The length.
Exceptions
Throw if arguments is out of range.
Properties
End
Get the End index.
public int End { get; }
Property Value
Length
Get the length.
public int Length { get; }
Property Value
Start
Get the Start index.
public int Start { get; }
Property Value
Methods
Combine(TextSpan, TextSpan)
Combines the text spans
public static TextSpan Combine(TextSpan left, TextSpan right)
Parameters
left
TextSpan
The left text span.
right
TextSpan
The right text span.
Returns
Combined the text span.
CompareTo(TextSpan)
Compare with other TextSpan
public int CompareTo(TextSpan other)
Parameters
other
TextSpan
The other TextSpan.
Returns
The start position of difference.
Create(int, int)
Create the TextSpan
public static TextSpan Create(int start, int length)
Parameters
start
int
The start position.
length
int
The length.
Returns
The TextSpan.
CreateEmpty()
Create the empty text span.
public static TextSpan CreateEmpty()
Returns
The TextSpan.
CreateEmpty(int)
Create empty TextSpan from start position.
public static TextSpan CreateEmpty(int start)
Parameters
start
int
The start position.
Returns
The TextSpan.
CreateFromStartEnd(int, int)
Create the TextSpan
public static TextSpan CreateFromStartEnd(int start, int end)
Parameters
start
int
The start position.
end
int
The end position.
Returns
The TextSpan.
Equals(TextSpan)
Compare with other TextSpan
public bool Equals(TextSpan other)
Parameters
other
TextSpan
The other TextSpan
Returns
The if both TextSpan are equal.
Equals(object)
Compare with other object
public override bool Equals(object obj)
Parameters
obj
object
The other object
Returns
The if both TextSpan are equal.
GetHashCode()
Get the HashCode
public override int GetHashCode()
Returns
The hashcode.
IsEmpty()
Return true if length ==0.
public bool IsEmpty()
Returns
The boolean value.
ToString()
Get ToString() override
public override string ToString()
Returns
The result string.
Operators
operator ==(TextSpan, TextSpan)
Override the == operator.
public static bool operator ==(TextSpan left, TextSpan right)
Parameters
left
TextSpan
The left text span.
right
TextSpan
The right text span.
Returns
True if the left equal the right.
operator !=(TextSpan, TextSpan)
Overrides the != operator
public static bool operator !=(TextSpan left, TextSpan right)
Parameters
left
TextSpan
The left text span.
right
TextSpan
The right text span.
Returns
True if the left not equal the right. </textspan></textspan>