Accept uppercase letters as digits, per the spec for Character.digit

This commit is contained in:
Eric Scharff 2008-08-05 14:05:36 -06:00
parent 0bd29069f4
commit f601897d9e

View File

@ -96,6 +96,8 @@ public final class Character implements Comparable<Character> {
digit = c - '0';
} else if ((c >= 'a') && (c <= 'z')) {
digit = c - 'a' + 10;
} else if ((c >= 'A') && (c <= 'Z')) {
digit = c - 'A' + 10;
} else {
return -1;
}