static public int hexCharToIntValue()

in ch-commons-util/src/main/java/com/cloudhopper/commons/util/HexUtil.java [278:314]


    static public int hexCharToIntValue(char c) {
        if (c == '0') {
            return 0;
        } else if (c == '1') {
            return 1;
        } else if (c == '2') {
            return 2;
        } else if (c == '3') {
            return 3;
        } else if (c == '4') {
            return 4;
        } else if (c == '5') {
            return 5;
        } else if (c == '6') {
            return 6;
        } else if (c == '7') {
            return 7;
        } else if (c == '8') {
            return 8;
        } else if (c == '9') {
            return 9;
        } else if (c == 'A' || c == 'a') {
            return 10;
        } else if (c == 'B' || c == 'b') {
            return 11;
        } else if (c == 'C' || c == 'c') {
            return 12;
        } else if (c == 'D' || c == 'd') {
            return 13;
        } else if (c == 'E' || c == 'e') {
            return 14;
        } else if (c == 'F' || c == 'f') {
            return 15;
        } else {
            throw new IllegalArgumentException("The character [" + c + "] does not represent a valid hex digit");
        }
    }