def utf8.count
import gralha-http-core@0.1.0.0/http.bend as Httpimport Base
59def utf8.count(s: String, acc: U32) -> U32:
60 match s:
61 case SNil{}:
62 acc
63 case SCon{Chr{c}, t}:
64 utf8.count(t, (acc + utf8.width(c) : U32))
import gralha-http-core@0.1.0.0/http.bend as Httpimport Base
59def utf8.count(s: String, acc: U32) -> U32:
60 match s:
61 case SNil{}:
62 acc
63 case SCon{Chr{c}, t}:
64 utf8.count(t, (acc + utf8.width(c) : U32))