public static Value rot(final ValueList valueList, final boolean isRot13) {
        valueList.assertCheckCount(1, isRot13 ? 1 : 2, false);
        valueList.assertCheckTypes((v, i) -> {
            if (i == 1) {
                return v.isLongBetween(-500, 500);
            }
            return true;
        }, i -> "Int from 0-500", false);
        return Value.of(rot(valueList.getAsString(0, ""), valueList.size() == 1 ? 13 : (int) valueList.get(1).getAsLong()));
    }
Holds implementations for functions in Formula
main/src/main/java/cgeo/geocaching/utils/formulas/FormulaUtils.java