9.9 CharacterClass
The CharacterClass domain allows classes of characters to be
defined and manipulated efficiently.
Character classes can be created by giving either a string or a list
of characters.
cl1 := charClass [char "a", char "e", char "i", char "o", char "u", char "y"]
Type: CharacterClass
cl2 := charClass "bcdfghjklmnpqrstvwxyz"
Type: CharacterClass
A number of character classes are predefined for convenience.
Type: CharacterClass
Type: CharacterClass
|
Type: CharacterClass
|
Type: CharacterClass
|
Type: CharacterClass
|
Type: CharacterClass
You can quickly test whether a character belongs to a class.
Type: Boolean
Type: Boolean
Classes have the usual set operations because the CharacterClass
domain belongs to the category FiniteSetAggregate(Character).
Type: CharacterClass
|
Type: CharacterClass
Type: CharacterClass
intersect(complement(cl1),cl2)
Type: CharacterClass
You can modify character classes by adding or removing characters.
Type: CharacterClass
Type: CharacterClass
For more information on related topics, see
CharacterXmpPage and
StringXmpPage .