private static String processFoundDegree(final String degree) {
        String d = processFoundText(degree);
        //remove trailing words
        Matcher m = DEGREE_TRAILINGSTUFF_REMOVER.matcher(d);
        while (m.find()) {
            final String group = m.group(1);
            d = d.substring(0, d.length() - group.length()).trim();
            m = DEGREE_TRAILINGSTUFF_REMOVER.matcher(d);
        }
        return d;
    }
Holds implementations for functions in Formula
main/src/main/java/cgeo/geocaching/utils/formulas/FormulaUtils.java