char_matcher library

Provides a first-class model of character classes, their composition and operations on strings.

The implementation closely follows Guava, the Google collection of libraries for Java-based projects.

Classes

CharMatcher
Abstract character matcher. [...]

Properties

ANY CharMatcher
Matches any character.
final
ASCII CharMatcher
Matches ASCII characters.
final
DIGIT CharMatcher
Matches digits.
final
LETTER CharMatcher
Matches letters.
final
LETTER_OR_DIGIT CharMatcher
Matches letter or digit characters.
final
LOWER_CASE_LETTER CharMatcher
Matches lower-case letters.
final
NONE CharMatcher
Matches no characters.
final
UPPER_CASE_LETTER CharMatcher
Matches upper-case letters.
final
WHITESPACE CharMatcher
Matches whitespaces.
final

Functions

inRange(dynamic start, dynamic stop) CharMatcher
Matches a character range from start to stop.
isChar(dynamic char) CharMatcher
Matches a character char.