(class)
An immutable set of characters. Its main purpose is to respond efficiently to queries about membership in the set; see CharClass.member?.
Programming Notes
| constructor
public
| {CharClass.default ...:any} |
| factory
public implicit
| {CharClass.from-any arg:any}:CharClass |
| digit-chars: | Provides the CharClass containing the ASCII digit characters, which are the values '0' through '9'. |
public constant CharClass.digit-chars:
CharClass ={make-digit-chars}
public constant CharClass.letter-chars:
CharClass ={make-letter-chars}
| whitespace-chars: | Provides the CharClass containing the Unicode whitespace characters, which are the values '\u0009', '\u000A', '\u000B', '\u000C', '\u000D', '\u0020' plus several non-ASCII whitespace values. |
public constant CharClass.whitespace-chars:
CharClass ={make-whitespace-chars}
| clone-writable: | Converts this class to a mutable version of itself. Changes made to the returned object will not affect the original. |
|
public
| {CharClass.complement-clone}:CharClass |
| member?: | Determines whether a character is a member of the class. Returns true if and only if the character is a member. |
|
public final inline
| {CharClass.member? ch:char}:bool |
(constructor)
| public
| {CharClass.default ...:any} |
(factory)
(class constant)
public constant CharClass.digit-chars:
CharClass ={make-digit-chars}
Provides the CharClass containing the ASCII digit characters, which are the values '0' through '9'.
(class constant)
public constant CharClass.letter-chars:
CharClass ={make-letter-chars}
Provides the CharClass containing the Unicode letter characters.
(class constant)
public constant CharClass.whitespace-chars:
CharClass ={make-whitespace-chars}
Provides the CharClass containing the Unicode whitespace characters, which are the values '\u0009', '\u000A', '\u000B', '\u000C', '\u000D', '\u0020' plus several non-ASCII whitespace values.
(method)
Converts this class to a mutable version of itself. Changes made to the returned object will not affect the original.
Returns
(method)
| public
| {CharClass.complement-clone}:CharClass |
Returns a clone containing the complement of self.
Returns
Description
Returns a clone which will be true for each character that self is false and false for any character that self is true.
Notes
The type returned may not be the same type as self.
(method)
Returns a clone containing the difference between self and zero or more CharClassInterfaces.
...: the rest arguments specify the
CharClassInterfaces from which you want to form the difference.
Returns
Description
Returns a clone which will be true for each character that self is true and all of arguments are false for.
Notes
The type returned may not be the same type as self.
(method)
Creates a new CharClassInterface with member characters mapped according to a supplied procedure.
folder: The procedure that maps member characters. The folder is called once for every character that is a member of the class.
Returns
The returned
CharClassInterface contains only those characters that
folder returned at least once.
Description
It is not possible for the returned
CharClassInterface to have more member characters than the original object.
Notes
(method)
Returns a clone containing the intersection of self and zero or more CharClassInterfaces.
...: the rest arguments specify the
CharClassInterfaces from which you want to form the intersection.
Returns
Description
Returns a clone which will be true for each character that self and all of arguments are true for.
Notes
The type returned may not be the same type as self.
(method)
| public final inline
| {CharClass.member? ch:char}:bool |
Determines whether a character is a member of the class. Returns true if and only if the character is a member.
ch: The character whose membership is to be tested.
(method)
Returns a clone containing the union of self and zero or more CharClassInterfaces.
...: the rest arguments specify the
CharClassInterfaces from which you want to form the union.
Returns
Description
Returns a clone which will be true for each character that self or any of the arguments is true for.
Notes
The type returned may not be the same type as self.