def Cursor.seek.if

bend-kit-bytes@0.3.3.0 · bytes.bend:833

import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
import Base

833def Cursor.seek.if(ok: Bool, c: Cursor, +pos: U32) -> Cursor & Bool:
834  match ok:
835    case False{}:
836      (c, False{})
837    case True{}:
838      Cursor{b, old, start, end} = c
839      (Cursor{b, pos, start, end}, True{})

Uses (5)

Used by (2)