def split_colon.go

bend-kit-http@0.38.2.0 · http.bend:272

import bend-kit-http@0.38.2.0/http.bend as Http
import Base

272def split_colon.go(s: String, acc: String, hit: Bool) -> String & String:
273  match s:
274    case SNil{}:
275      match hit:
276        case True{}:
277          take.cut(acc, SNil{})
278        case False{}:
279          (String.reverse(acc), SNil{})
280    case SCon{Chr{+c}, t}:
281      match hit:
282        case True{}:
283          take.cut(acc, SCon{Chr{c}, t})
284        case False{}:
285          split_colon.go(t, SCon{Char.to_lower(Chr{c}), acc}, U32.is_eq(c, 58))

Uses (9)

Used by (1)