def utf8
import ezx@1.11.0.0/src/share/sha.bend as Shaimport Base
131# the string's characters encoded as UTF-8, each byte a character
132def utf8(+text: String) -> String:
133 match text:
134 case SNil{}:
135 ""
136 case SCon{c, t}:
137 utf8.put(Char.to_u32(c)) ++ utf8(t)