def utf8.width
import gralha-http-core@0.1.0.0/http.bend as Httpimport Base
55def utf8.width(+c: U32) -> U32:
56 when(U32, U32.is_lt(c, 128), _ => 1, _ => when(U32, U32.is_lt(c, 2048), _ => 2,
57 _ => when(U32, U32.is_lt(c, 65536), _ => 3, _ => 4)))