Skip to main content

CompletionAsk struct

Namespace: Arlecchino.Editing · Assembly: Arlecchino

The half-typed word something is being asked to finish, and the line it stands in. The line goes with it because what a word could turn into depends on what stands in front of it.

public readonly struct CompletionAsk : IEquatable<CompletionAsk>

Implements IEquatable<T><CompletionAsk>

Constructors

MemberSummary
CompletionAsk(string, int, int)The half-typed word something is being asked to finish, and the line it stands in. The line goes with it because what a word could turn into depends on what stands in front of it.

Properties

MemberSummary
LengthHow long the word is. It ends where the caret is.
LineThe line as it stands.
PrefixWhatever stands in front of the word.
StartWhere the word begins in it.
SuffixWhatever follows the caret, which finishing the word leaves where it is.
WordThe word itself, which is empty where the caret stands after a space.

Methods

MemberSummary
Deconstruct(out string, out int, out int)

Constructors in detail

CompletionAsk(string, int, int)

public CompletionAsk(string Line, int Start, int Length);

The half-typed word something is being asked to finish, and the line it stands in. The line goes with it because what a word could turn into depends on what stands in front of it.

Parameters

NameTypeDescription
LinestringThe line as it stands.
StartintWhere the word begins in it.
LengthintHow long the word is. It ends where the caret is.

Properties in detail

Length

public int Length { get; init; }

How long the word is. It ends where the caret is.

Type int

Line

public string Line { get; init; }

The line as it stands.

Type string

Prefix

public string Prefix { get; }

Whatever stands in front of the word.

Type string

Start

public int Start { get; init; }

Where the word begins in it.

Type int

Suffix

public string Suffix { get; }

Whatever follows the caret, which finishing the word leaves where it is.

Type string

Word

public string Word { get; }

The word itself, which is empty where the caret stands after a space.

Type string

Methods in detail

Deconstruct(out string, out int, out int)

public void Deconstruct(out string Line, out int Start, out int Length);

Parameters

NameTypeDescription
Linestring
Startint
Lengthint