git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1074298 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ad549f8f34
commit
15d50cf864
|
@ -987,7 +987,7 @@ private static int ordinalIndexOf(String str, String searchStr, int ordinal, boo
|
||||||
int found = 0;
|
int found = 0;
|
||||||
int index = lastIndex ? str.length() : INDEX_NOT_FOUND;
|
int index = lastIndex ? str.length() : INDEX_NOT_FOUND;
|
||||||
do {
|
do {
|
||||||
if(lastIndex) {
|
if (lastIndex) {
|
||||||
index = str.lastIndexOf(searchStr, index - 1);
|
index = str.lastIndexOf(searchStr, index - 1);
|
||||||
} else {
|
} else {
|
||||||
index = str.indexOf(searchStr, index + 1);
|
index = str.indexOf(searchStr, index + 1);
|
||||||
|
|
Loading…
Reference in New Issue