Predefined character classes
. Any character (may or may not match line terminators)
\d A digit: [0-9]
\D A non-digit: [^0-9]
\s A whitespace character: [ \t\n\x0B\f\r]
\S A non-whitespace character: [^\s]
\w A word character: [a-zA-Z_0-9]
\W A non-word character: [^\w]
digit
public static int digit(char ch,
int radix)Returns the numeric value of the character ch in the specified radix.
Parameters:
ch - the character to be converted.
radix - the radix.
Returns:
the numeric value represented by the character in the specified radix.
Since:
JDK1.0