| This class represents a set of characters.
Instances of this class are typically used for parsing purpose
(faster than regular expressions for simple patterns). For example:[code]
// Integration with Text.
Text number;
int exponentIndex = num.indexOfAny(CharSet.valueOf('e', 'E'));
// Integration with TextFormat.
public List parse(CharSequence csq, TextFormat.Cursor cursor) {
FastTable numbers = FastTable.newInstance();
while (cursor.skip(CharSet.WHITESPACES, csq)) {
numbers.add(TypeFormat.parseInt(csq, cursor));
}
return numbers;
}
[/code]
author: Jean-Marie Dautelle version: 3.7, January 1, 2006 |