Table of Contents

Struct LinkSpan

Namespace
SharpConsoleUI.Parsing
Assembly
SharpConsoleUI.dll

A clickable link region over a single rendered line, expressed in display-column (cell) coordinates. The range is half-open: [StartCol, EndCol).

public readonly struct LinkSpan
Inherited Members
Extension Methods

Constructors

LinkSpan(int, int, string, string)

Creates a link span.

public LinkSpan(int startCol, int endCol, string url, string text)

Parameters

startCol int

First display column (inclusive).

endCol int

One past the last display column (exclusive).

url string

The link target URL (already unescaped).

text string

The visible link text.

Fields

EndCol

One past the last display column (exclusive) covered by the link.

public readonly int EndCol

Field Value

int

StartCol

First display column (inclusive) covered by the link.

public readonly int StartCol

Field Value

int

Text

The visible link text.

public readonly string Text

Field Value

string

Url

The link target URL (already unescaped).

public readonly string Url

Field Value

string

Methods

Contains(int)

True if col falls within [StartCol, EndCol).

public bool Contains(int col)

Parameters

col int

The display column to test.

Returns

bool

True if the column is covered by this span.