No need to nest.

This commit is contained in:
Gary Gregory 2020-06-26 15:31:00 -04:00
parent bb017e0d4d
commit 10f6a80c96
1 changed files with 4 additions and 5 deletions

View File

@ -278,14 +278,13 @@ public class CharSequenceUtils {
}
if (checkLaterThan1(cs, searchChar, len2, i)) {
return i;
} else {
}
i--;
if (i < 0) {
return -1;
}
}
}
}
private static boolean checkLaterThan1(final CharSequence cs, final CharSequence searchChar, int len2, int start1) {
for (int i = 1, j = len2 - 1; i <= j; i++, j--) {