in src/main/java/org/apache/commons/lang3/Conversion.java [657:700]
public static int hexDigitMsb0ToInt(final char hexDigit) {
switch (hexDigit) {
case '0':
return 0x0;
case '1':
return 0x8;
case '2':
return 0x4;
case '3':
return 0xC;
case '4':
return 0x2;
case '5':
return 0xA;
case '6':
return 0x6;
case '7':
return 0xE;
case '8':
return 0x1;
case '9':
return 0x9;
case 'a':// fall through
case 'A':
return 0x5;
case 'b':// fall through
case 'B':
return 0xD;
case 'c':// fall through
case 'C':
return 0x3;
case 'd':// fall through
case 'D':
return 0xB;
case 'e':// fall through
case 'E':
return 0x7;
case 'f':// fall through
case 'F':
return 0xF;
default:
throw new IllegalArgumentException("Cannot interpret '" + hexDigit + "' as a hexadecimal digit");
}
}