def before.go

bend-lint-api@0.2.0.0 · shared/strings.bend:57

import bend-lint-api@0.2.0.0/shared/strings.bend as Strings
import Base

57def before.go(s: String, +sep: Char, acc: String, at: Bool) -> String:
58  match s at:
59    case SNil{} _:
60      ""
61    case _ True{}:
62      String.reverse(acc)
63    case SCon{c, +rest} False{}:
64      before.go(rest, sep, SCon{c, acc}, starts_with(rest, sep))

Uses (5)

Used by (1)