def esc.ctl
import bend-kit-notch@0.4.0.0/notch.bend as Notchimport Base
88def esc.ctl(ctl: Bool, +c: U32, rest: String) -> String:
89 match ctl:
90 case True{}:
91 SCon{Chr{92}, SCon{'u', SCon{'0', SCon{'0', SCon{hex(U32.shrn(c, 4n)),
92 SCon{hex((c .&. 15 : U32)), rest}}}}}}
93 case False{}:
94 SCon{Chr{c}, rest}