def octets.onto

emerging-ezhttp@0.21.0.0 · src/form.bend:53

import emerging-ezhttp@0.21.0.0/src/form.bend as Form
import Base
import emerging-ezhttp@0.21.0.0/src/pct.bend as Pct

53# a string's UTF-8 octets in front of `rest` (RFC 3629 §3)
54def octets.onto(s: String, rest: List<&2, U32>) -> List<&2, U32>:
55  match s:
56    case SNil{}:
57      rest
58    case SCon{Chr{+cp}, tail}:
59      List.append(&2, U32, Pct.utf8(cp), octets.onto(tail, rest))

Uses (6)

Used by (5)