Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.4
-
None
-
None
-
OS X Yosemite 10.10.5. Maven project.
Description
In Apache Commons Lang 3.4, StringUtils.ordinalIndexOf("abc", "ab", 1) gives incorrect answer of -1 (correct answer should be 0)。but StringUtils.ordinalIndexOf("abc", "a", 1) gives correct answer of 0.
Based on the above mentioned observation, the bug occurrs if the searchStr is of length > 1, and locates at the index 0 of the str.
In Apache Commons Lang 2.6, this bug is not observed.
Attachments
Issue Links
- relates to
-
LANG-1077 [PATCH] StringUtils.ordinalIndexOf("aaaaaa", "aa", 2) should return 2
- Closed