def text.case.covers
import ezsys@0.1.0.0/src/str.bend as Strimport Base
227# whether a rule maps the code point
228def text.case.covers(rule: Rule, +cp: U32) -> Bool:
229 match rule:
230 case Rule{+lo, +hi, +step, _to}:
231 Bool.and(Bool.and(U32.is_ge(cp, lo), U32.is_le(cp, hi)),
232 U32.is_eq(((cp - lo) % step : U32), 0))