def line.first

ezx@1.11.0.0 · src/pub/blurb.bend:44

import ezx@1.11.0.0/src/pub/blurb.bend as Blurb
import Base

44# a text's first line: everything before its first newline, the whole text
45# when it has none
46def line.first(text: String) -> String:
47  match text:
48    case SNil{}:
49      SNil{}
50    case SCon{+h, t}:
51      line.step(Char.is_eq(h, '\n'), h, _u => line.first(t))

Uses (4)

Used by (1)