int (String anotherString) { int i = Math.min(count, anotherString.count); int x = offset; int y = anotherString.offset; while (--i >= 0) { int result = value[x++] - anotherString.value[y++]; if (result != 0) return result; } return count - anotherString.count; }