UI module

offset_by

procedure · 1 overloadsince 0.31.0Source

Offset one unit to the left (direction -1) or right (1) of from.

offset_by :: (edit: *Text_Edit, from: int, unit: Unit, direction: int) -> int

Offset one unit to the left (direction -1) or right (1) of from.

Parameters

edit: *Text_Edit
the text being edited.
from: int
the byte offset to start from.
unit: Unit
how far to go.
direction: int
-1 for left, 1 for right.

Returns

int

See also