def bytes.slice

gralha-bytes@0.1.0.1 · bytes.bend:78

import gralha-bytes@0.1.0.1/bytes.bend as Bytes
import Base

78def bytes.slice(n: Nat, +source: Bytes, +start: U32, target: Bytes) -> Bytes:
79  match n:
80    case 0n: target
81    case 1n+d: bytes.slice(d, source, U32.inc(start), bytes.push(target, bytes.get(source, start)))
82
83@unsafe

Uses (6)

Used by (2)