StringUtils JavaDoc contains erroneous examples
-----------------------------------------------
Key: LANG-631
URL: https://issues.apache.org/jira/browse/LANG-631
Project: Commons Lang
Issue Type: Bug
Components: lang.*
Affects Versions: 2.5, 3.0
Reporter: Maxx
Priority: Minor
For the method: static int lastIndexOf(String str, String searchStr)
@
(v2.5):
http://commons.apache.org/lang/api-release/org/apache/commons/lang/StringUtils.html#lastIndexOf(java.lang.String,%20java.lang.String)
(v3.0):
http://commons.apache.org/lang/api/org/apache/commons/lang3/StringUtils.html#lastIndexOf(java.lang.String,%20java.lang.String)
These results are wrong:
StringUtils.lastIndexOf("aabaabaa", "a") = 0
StringUtils.lastIndexOf("aabaabaa", "b") = 2
StringUtils.lastIndexOf("aabaabaa", "ab") = 1
Correct values:
1st = 7
2nd = 5
3rd = 4
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.