int (String str, int fromIndex) { fromIndex = Math.min(fromIndex, count - str.count); for ( ; fromIndex >= 0; fromIndex--) if (regionMatches(fromIndex, str, 0, str.count)) return fromIndex; return -1; }