def Pct.decode
import bend-kube-runtime@0.2.0.0/src/proxy.bend as Proxyimport Base
import bend-kube-runtime@0.2.0.0/src/utf8.bend as U
219# The bytes of a percent-encoded URL part ("%40" is '@'); a '%' that starts
220# no escape stays as it is.
221def Pct.decode(s: String) -> List<&2, U32>:
222 match s:
223 case SNil{}:
224 Nil{}
225 case SCon{'%', SCon{a, SCon{b, t}}}:
226 Pct.esc(a, b, Pct.decode(t))
227 case SCon{c, t}:
228 U.Utf8.put(Char.to_u32(c), Pct.decode(t))