caseFold

public func caseFold(Char) -> Char

Single-codepoint case fold for c. Use when comparing characters case-insensitively: caseFold(a) == caseFold(b) is the canonical per-character equality test.

For codepoints whose Unicode fold is multi-codepoint (e.g. ß → ss), this returns only the first folded codepoint — see caseFoldExpansion for the full sequence.

Examples

caseFold('A') // 'a' caseFold('İ') // 'i' — see caseFoldExpansion for "i\u{307}" caseFold('a') == caseFold('A') // true

Defined in lang/std/text/unicode/case_folding.ks