Here you can find the source of charToDecimal(char c)
private static int charToDecimal(char c)
//package com.java2s; public class Main { private static int charToDecimal(char c) { if (c >= '0' && c <= '9') return c - '0'; else if (c >= 'a' && c <= 'z') return 10 + (c - 'a'); throw new IllegalArgumentException("cannot convert " + c + " to decimal"); }//from ww w . j a va2 s .c o m }