Qs.tok.pct1: def of emerging-ezhttp@0.21.0.0 Import: import emerging-ezhttp@0.21.0.0/src/qs.bend as Qs Lines 72-80 of emerging-ezhttp@0.21.0.0/src/qs.bend: https://jend.leeeet.dev/read.txt?path=emerging-ezhttp@0.21.0.0/src/qs.bend&start_line=72&end_line=80 import Base import emerging-ezhttp@0.21.0.0/src/http.bend as Http # a character after `%` and a hex digit: a second hex digit makes the byte # they name, anything else leaves `%` and the digit as written def tok.pct1(plus: Bool, +d: Char, +c: Char, k: Esc -> List<&2, Tok>, hex: Bool) -> List<&2, Tok>: match hex: case True{}: B{U32.add(U32.mul(Http.hex.val(d), 16), Http.hex.val(c))} <> k(Plain{}) case False{}: B{37} <> (B{Char.to_u32(d)} <> tok.plain(plus, c, k)) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char.to_u32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.mul https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.21.0.0/src/http.bend&name=hex.val https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.21.0.0/src/qs.bend&name=Esc https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.21.0.0/src/qs.bend&name=Tok https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.21.0.0/src/qs.bend&name=tok.plain