Skip to content

Index[Kind: _IndexKind]

[Source]

class val Index[Kind: _IndexKind]

Public Functions

value

[Source]

The underlying numeric offset.

fun box value()
: USize val

Returns


add

[Source]

Add n to this index, producing a new index of the same kind. Useful for stepping forward in iteration code. The result is NOT range-checked against any specific Text — callers receiving an out-of-range index from an op (e.g., grapheme_at) will get OutOfRange back.

fun box add(
  n: USize val)
: Index[Kind] val

Parameters

Returns


eq

[Source]

fun box eq(
  that: Index[Kind] box)
: Bool val

Parameters

Returns


lt

[Source]

fun box lt(
  that: Index[Kind] box)
: Bool val

Parameters

Returns


hash

[Source]

fun box hash()
: USize val

Returns