def cut

ezx@1.11.0.0 · src/sha/nar.bend:244

import ezx@1.11.0.0/src/sha/nar.bend as Nar
import Base

244# the fields of a listing, each ended by a NUL, exactly as they were printed
245def cut(text: String) -> List<&2, String>:
246  match text:
247    case SNil{}:
248      []
249    case SCon{+c, t}:
250      cut.at(Char.is_eq(c, nul()), c, cut(t))

Uses (5)

Used by (1)