def text.case.apply
import ezsys@0.1.0.0/src/str.bend as Strimport Base
253# the code point the first rule that covers it maps it to; itself when none
254# does
255def text.case.apply(rules: List<&2, Rule>, +cp: U32) -> U32:
256 match rules:
257 case Nil{}:
258 cp
259 case +r <> rest:
260 text.case.pick(text.case.covers(r, cp), r, cp,
261 _u => text.case.apply(rest, cp))