Struct TextSpan

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

ArgumentOutOfRangeException

Throw if arguments is out of range.

Properties

End

Get the End index.

public int End { get; }

Property Value

int

Length

Get the length.

public int Length { get; }

Property Value

int

Start

Get the Start index.

public int Start { get; }

Property Value

int

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

TextSpan

Combined the text span.

CompareTo(TextSpan)

Compare with other TextSpan

public int CompareTo(TextSpan other)

Parameters

other TextSpan

The other TextSpan.

Returns

int

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

TextSpan

The TextSpan.

CreateEmpty()

Create the empty text span.

public static TextSpan CreateEmpty()

Returns

TextSpan

The TextSpan.

CreateEmpty(int)

Create empty TextSpan from start position.

public static TextSpan CreateEmpty(int start)

Parameters

start int

The start position.

Returns

TextSpan

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

TextSpan

The TextSpan.

Equals(TextSpan)

Compare with other TextSpan

public bool Equals(TextSpan other)

Parameters

other TextSpan

The other TextSpan

Returns

bool

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

bool

The if both TextSpan are equal.

GetHashCode()

Get the HashCode

public override int GetHashCode()

Returns

int

The hashcode.

IsEmpty()

Return true if length ==0.

public bool IsEmpty()

Returns

bool

The boolean value.

ToString()

Get ToString() override

public override string ToString()

Returns

string

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

bool

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

bool

True if the left not equal the right. </textspan></textspan>