def item.has
import bend-kit-regex@0.8.0.0/regex.bend as Regeximport Base
import bend-kit-unicode@0.1.0.0/unicode.bend as U
886def item.has(i: Item, +c: U32) -> Bool:
887 match i:
888 case Rng{+lo, +hi}:
889 U32.is_le(lo, c) && U32.is_le(c, hi)
890 case Prop{neg, name}:
891 Bool.xor(neg, String.starts_with(U.category(Chr{c}), name))