Unescape.digit.of: def of emerging-ezhttp@0.21.0.0 Import: import emerging-ezhttp@0.21.0.0/src/unescape.bend as Unescape Lines 33-45 of emerging-ezhttp@0.21.0.0/src/unescape.bend: https://jend.leeeet.dev/read.txt?path=emerging-ezhttp@0.21.0.0/src/unescape.bend&start_line=33&end_line=45 import Base # a digit's value in a base (16 or 10), or 16 when it is not one def digit.of(hex: Bool, +cp: U32) -> U32: match hex: case True{}: Bool.pick(U32, Bool.and(U32.is_le(48, cp), U32.is_le(cp, 57)), U32.sub(cp, 48), Bool.pick(U32, Bool.and(U32.is_le(65, cp), U32.is_le(cp, 70)), U32.sub(cp, 55), Bool.pick(U32, Bool.and(U32.is_le(97, cp), U32.is_le(cp, 102)), U32.sub(cp, 87), 16))) case False{}: Bool.pick(U32, Bool.and(U32.is_le(48, cp), U32.is_le(cp, 57)), U32.sub(cp, 48), 16) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub