public static long letterValue(final String value) {
        if (value == null) {
            return 0;
        }
        long lv = 0;
        final String strippedValue = StringUtils.stripAccents(value);
        for (int i = 0; i < value.length(); i++) {
            final char c = strippedValue.charAt(i);
            final Integer v = SPECIAL_LETTER_VALUE_MAP.get(value.charAt(i));
            if (v != null) {
                lv += v;
            } else if (c >= 'a' && c <= 'z') {
                lv += (int) c - (int) 'a' + 1;
            } else if (c >= 'A' && c <= 'Z') {
                lv += (int) c - (int) 'A' + 1;
            } else if (c >= '0' && c <= '9') {
                lv += (int) c - (int) '0';
            }
        }
        return lv;
    }
Holds implementations for functions in Formula
main/src/main/java/cgeo/geocaching/utils/formulas/FormulaUtils.java