StringLine Struct

A struct representing a text line.

public struct StringLine

Constructors

NameDescription
StringLine(StringSlice, int, int, int, NewLine)Initializes a new instance of the StringLine struct.
StringLine(StringSlice)Initializes a new instance of the StringLine struct.
StringLine(StringSlice, int, int, int, NewLine)Initializes a new instance of the StringLine struct.

StringLine overloads

StringLine(StringSlice, int, int, int, NewLine)

StringLine.cs

Initializes a new instance of the StringLine struct.

public StringLine(StringSlice slice, int line, int column, int position, NewLine newLine)
Parameters
slice StringSlice
The slice.
line int
The line.
column int
The column.
position int
The position.
newLine NewLine
The line separation.

StringLine(StringSlice)

StringLine.cs

Initializes a new instance of the StringLine struct.

public StringLine(ref StringSlice slice)
Parameters
slice StringSlice
The slice.

StringLine(StringSlice, int, int, int, NewLine)

StringLine.cs

Initializes a new instance of the StringLine struct.

public StringLine(ref StringSlice slice, int line, int column, int position, NewLine newLine)
Parameters
slice StringSlice
The slice.
line int
The line.
column int
The column.
position int
The position.
newLine NewLine
The line separation.

Methods

NameDescription
ToString()Performs the to string operation.

ToString()

StringLine.cs

Performs the to string operation.

public override readonly string ToString()

Returns

string

Operators

NameDescription
implicit operator StringSlice(StringLine)Performs an implicit conversion from StringLine to StringSlice.

implicit operator StringSlice(StringLine)

StringLine.cs

Performs an implicit conversion from StringLine to StringSlice.

public static implicit operator StringSlice(StringLine line)

Parameters

line StringLine
The line.

Returns

StringSlice The result of the conversion.

Fields

NameDescription
ColumnThe column position.
LineThe line position.
NewLineThe newline.
PositionThe position of the start of this line within the original source code
SliceThe slice used for this line.

Column

The column position.

public int Column

Line

The line position.

public int Line

NewLine

The newline.

public NewLine NewLine

Position

The position of the start of this line within the original source code

public int Position

Slice

The slice used for this line.

public StringSlice Slice