def utf.go

bend-kit-router@0.2.0.0 · target.bend:49

import bend-kit-router@0.2.0.0/target.bend as Target
import Base

49def utf.go(s: String, st: Maybe<&2, Utf>) -> Maybe<&2, String>:
50  match s:
51    case SNil{}:
52      utf.finish(st)
53    case SCon{Chr{+c}, t}:
54      match st:
55        case None{}:
56          None{}
57        case Some{Utf{+need, lo, hi, cp, out}}:
58          utf.go(t, utf.step(U32.is_eq(need, 0), c, need, lo, hi, cp, out))

Uses (7)

Used by (1)