def clean
import ezx@1.11.0.0/src/sha/nar.bend as Narimport Base
252# whether a text holds no NUL, as no name and no link target can
253def clean(text: String) -> Bool:
254 match text:
255 case SNil{}:
256 True{}
257 case SCon{c, t}:
258 +rest = clean(t)
259 Bool.and(Bool.not(Char.is_eq(c, nul())), rest)