Here you can find the source of convertString(char firstCharacter, String value)
private static int convertString(char firstCharacter, String value)
//package com.java2s; /*L//from w w w . j a v a 2 s.co m * Copyright Moxie Informatics. * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/calims/LICENSE.txt for details. */ public class Main { private static final int LETTER_BASE = 26; private static int convertString(char firstCharacter, String value) { int result = 0; for (int i = 0; i < value.length(); i++) { result = result * LETTER_BASE + value.charAt(i) - firstCharacter; } return result; } }