def utf8.count

gralha-http-core@0.1.0.0 · http.bend:59

import gralha-http-core@0.1.0.0/http.bend as Http
import 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))

Uses (5)

Used by (1)