Here you can find the source of charToInt(char c)
private static int charToInt(char c)
//package com.java2s; //License from project: Open Source License public class Main { private static int charToInt(char c) { int i = 0; if (Character.isUpperCase(c)) i += 26;/*w w w. j a v a 2 s .c o m*/ return i + Character.getNumericValue(c); } }