Interface CharCaseFolding

A set of functions that can be used to perform case-insensitive matching.

It must fulfill the following conditions:

  1. canonicalize must be idempotent, i.e. canonicalize(canonicalize(char)) === canonicalize(char).
  2. toCharSet(canonicalize(a)) is the set of all characters c such that canonicalize(a) === canonicalize(c).

Hierarchy

  • CharCaseFolding

Properties

canonicalize?: ((char: Char) => Char)

Type declaration

    • (char: Char): Char
    • The canonicalization function. This typically maps characters to their lowercase form.

      If no function is given, then the identity function is used. This also implies that toCharSet must return a set containing only the given character.

      Parameters

      Returns Char

      Default

      char => char
      
toCharSet: ((char: Char) => CharSet)

Type declaration