Skip to content

Commit

Permalink
Whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Apr 19, 2024
1 parent beb39d4 commit 35c9e80
Showing 1 changed file with 0 additions and 5 deletions.
Expand Up @@ -59,26 +59,21 @@ static boolean regionMatches(final CharSequence cs, final boolean ignoreCase, fi
int index1 = thisStart;
int index2 = start;
int tmpLen = length;

while (tmpLen-- > 0) {
final char c1 = cs.charAt(index1++);
final char c2 = substring.charAt(index2++);

if (c1 == c2) {
continue;
}

if (!ignoreCase) {
return false;
}

// The same check as in String.regionMatches():
if (Character.toUpperCase(c1) != Character.toUpperCase(c2) &&
Character.toLowerCase(c1) != Character.toLowerCase(c2)) {
return false;
}
}

return true;
}
}

0 comments on commit 35c9e80

Please sign in to comment.