Character.getNumericValue
Class Overview | Class Members |
This Package |
All Packages
public static int getNumericValue( char ch )
Parameters
- ch
- the character to be converted.
- radix
- the radix.
Returns
the numeric value of the character, as a nonnegative int value;
-2 if the character has a numeric value that is not a
nonnegative integer; -1 if the character has no numeric value.
Description
Returns the Unicode numeric value of the character as a
nonnegative integer.
If the character does not have a numeric value, then -1 is returned.
If the character has a numeric value that cannot be represented as a
nonnegative integer (for example, a fractional value), then -2
is returned.
See Also
forDigit, isDigit