public int compareTo(StringPointer cmp, int len) {
            return this.string.substring(this.index,this.index+len).compareTo(
                    cmp.string.substring(cmp.index, cmp.index+len));
        }
Only works with non-negative numbers
main/src/main/java/cgeo/geocaching/wherigo/kahlua/stdlib/StringLib.java