def Yaml.uncomment
import bend-kube-runtime@0.2.0.0/src/yaml.bend as Yamlimport Base
98# Drops a comment, to the end of the line.
99def Yaml.uncomment(s: String, +q: U32, cut: Bool) -> String:
100 match s cut:
101 case _ True{}:
102 SNil{}
103 case SNil{} False{}:
104 SNil{}
105 case SCon{+c, +t} False{}:
106 SCon{c, Yaml.uncomment(t, Yaml.nq(c, q), Yaml.cut_at(t, Yaml.nq(c, q), Char.is_space(c)))}