def text.valid
import bend-kit-router@0.2.0.0/target.bend as Targetimport Base
60def text.valid(s: String, +slash: Bool) -> Bool:
61 match s:
62 case SNil{}:
63 True{}
64 case SCon{Chr{+c}, t}:
65 Bool.and(Bool.and(U32.is_ne(c, 0), Bool.not(Bool.and(slash, U32.is_eq(c, 47)))), text.valid(t, slash))