Farkle


Position Type

A point in 2D space with integer coordinates, suitable for the position of a character in a text.

Record fields

Record Field Description

Column

Full Usage: Column

Field type: uint64

The position's column. Numbering starts from 1.

Field type: uint64

Index

Full Usage: Index

Field type: uint64

The position's character index. Numbering starts from 0.

Field type: uint64

Line

Full Usage: Line

Field type: uint64

The position's line. Numbering starts from 1.

Field type: uint64

Instance members

Instance member Description

this.Advance

Full Usage: this.Advance

Parameters:
Returns: Position

Advances the position by a read-only span of characters and returns it.

span : ReadOnlySpan<char>
Returns: Position

this.Advance

Full Usage: this.Advance

Parameters:
    c : char

Returns: Position

Advances the position by one character and returns it.

c : char
Returns: Position

Static members

Static member Description

Position.Create(line) (column) (index)

Full Usage: Position.Create(line) (column) (index)

Parameters:
    line : uint64
    column : uint64
    index : uint64

Returns: Position
line : uint64
column : uint64
index : uint64
Returns: Position

Position.Initial

Full Usage: Position.Initial

Returns: Position

A `Position` that points to the start of the text.

Returns: Position