def color.hex.digit

gralha-svg-render@0.1.0.1 · svg.bend:799

import gralha-svg-render@0.1.0.1/svg.bend as Svg
import Base
import gralha-text-scan@0.1.0.1/scan.bend as U

799# Hex digits after a '#', read in one pass: the value and count when the
800# rest is only whitespace, else a count of 0 so the general parser decides.
801def color.hex.digit(+ch: U32) -> Bool:
802  U.digit(ch) || (U32.is_ge(U32.or(ch, 32), 97) && U32.is_le(U32.or(ch, 32), 102))

Uses (8)

Used by (2)