Expand description
Case-insensitive matching (FR-A10) as closure of symbol sets.
A CaseFold is a canonicalisation canon: code point -> code point
(stored sparsely as the pairs where it changes a character). Two characters
match case-insensitively when their canonical forms are equal, so the set
matched by a class S is { c : canon(c) in canon(S) }.
Dialects differ only in the canonicalisation (RULE-10):
- ECMAScript without
u:toUpperCasewhen it yields one character and does not map non-ASCII into ASCII (ECMA-262 Canonicalize); - ECMAScript with
u, Go, Rust, PCRE2: Unicode simple case folding; - Python
re: simple lowercase plus the interpreter’s equivalence keys (e.g.ialso matches dotlessı), or ASCII-only underre.ASCII.
No supported dialect defines full case folding (ß vs ss) for matching,
so none is implemented.
Structs§
- Case
Fold - Sparse canonicalisation and the closure operations built on it.
Enums§
- Case
Model - Which canonicalisation to use.