def split1

ezx@1.11.0.0 · src/git/git.bend:594

import ezx@1.11.0.0/src/git/git.bend as Git
import Base

594# a string cut at the first of a character, the character dropped; no hit leaves
595# the whole string on the left
596def split1(+sep: Char, text: String) -> Cut:
597  match text:
598    case SNil{}:
599      Cut{"", ""}
600    case SCon{+h, +t}:
601      split1.step(Char.is_eq(h, sep), h, t, _u => split1(sep, t))

Uses (5)

Used by (2)