def Url.split_path

bend-kube-runtime@0.2.0.0 · src/config.bend:56

import bend-kube-runtime@0.2.0.0/src/config.bend as Config
import Base

56# Splits "authority/path" at the first '/'.
57def Url.split_path(s: String, acc: String) -> String & String:
58  match s:
59    case SNil{}:
60      (String.reverse(acc), "")
61    case SCon{'/', t}:
62      (String.reverse(acc), SCon{'/', t})
63    case SCon{c, t}:
64      Url.split_path(t, SCon{c, acc})

Uses (9)

Used by (2)