def utf8.encode

cswap-bend-cli@0.1.0.0 · b64.bend:22

import cswap-bend-cli@0.1.0.0/b64.bend as B64
import Base

22# The UTF-8 bytes of a string.
23def utf8.encode(s: String) -> List<&2, U32>:
24  match s:
25    case SNil{}:
26      []
27    case SCon{Chr{c}, t}:
28      utf8.cat(c, utf8.encode(t))

Uses (5)

Used by (1)