def split.at

ezmcp@0.1.0.0 · src/line.bend:26

import ezmcp@0.1.0.0/src/line.bend as Line
import Base

26# a newline ends a piece of its own, which the bytes before it join; any
27# other byte joins the first piece
28def split.at(
29  byte: U32,
30  ps: List<&2, List<&2, U32>>,
31  cut: Bool
32) -> List<&2, List<&2, U32>>:
33  match cut:
34    case True{}:
35      [byte] <> ps
36    case False{}:
37      split.put(byte, ps)

Uses (4)

Used by (1)