Character.digit

Character.digit

Class Overview | Class Members | This Package | All Packages

Syntax
public static int digit( char ch, int radix )
Parameters
ch
the character to be converted.
radix
the radix.
Returns
the numeric value represented by the character in the specified radix.
Description
Returns the numeric value of the character ch in the specified radix.

If the radix is not in the range MIN_RADIX <= radix <= MAX_RADIX or if the value of ch is not a valid digit in the specified radix, -1 is returned. A character is a valid digit if at least one of the following is true:

See Also
forDigit, isDigit