public static int digit(int ch, int radix)
    {
        if (2 <= radix && radix <= 36) {
            int value = digit(ch);
            if (value < 0) {
                // ch is not a decimal digit, try latin letters
                value = UCharacterProperty.getEuropeanDigit(ch);
            }
            return (value < radix) ? value : -1;
        } else {
            return -1;  // invalid radix
        }
    }
public static int digit ( int ch , int radix ) { if ( 2 <= radix && radix <= 36 ) { int value = digit ( ch ) ; if ( value < 0 ) { value = UCharacterProperty . getEuropeanDigit ( ch ) ; } return ( value < radix ) ? value : - 1 ; } else { return - 1 ; } }
Returnss the numeric value of a decimal digit code point.
<br>This method observes the semantics of
<code>java.lang.Character.digit()</code>.  Note that this
will return positive values for code points for which isDigit
returns false, just like java.lang.Character.
<br><em>Semantic Change:</em> In release 1.3.1 and
prior, this did not treat the European letters as having a
digit value, and also treated numeric letters and other numbers as
digits.
This has been changed to conform to the java semantics.
<br>A code point is a valid digit if and only if:
<ul>
<li>ch is a decimal digit or one of the european letters, and
<li>the value of ch is less than the specified radix.
</ul>
@param ch the code point to query
@param radix the radix
@return the numeric value represented by the code point in the
specified radix, or -1 if the code point is not a decimal digit
or if its value is too large for the radix