Adding extra javadoc to point out that usually indexOf on an empty String == -1. LANG-589
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@907561 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
10cc16fe82
commit
1b5c1b4371
|
@ -794,6 +794,7 @@ public class StringUtils {
|
|||
* StringUtils.indexOf(null, *) = -1
|
||||
* StringUtils.indexOf(*, null) = -1
|
||||
* StringUtils.indexOf("", "") = 0
|
||||
* StringUtils.indexOf("", *) = -1 (except when * = "")
|
||||
* StringUtils.indexOf("aabaabaa", "a") = 0
|
||||
* StringUtils.indexOf("aabaabaa", "b") = 2
|
||||
* StringUtils.indexOf("aabaabaa", "ab") = 1
|
||||
|
@ -827,6 +828,7 @@ public class StringUtils {
|
|||
* StringUtils.indexOf(null, *, *) = -1
|
||||
* StringUtils.indexOf(*, null, *) = -1
|
||||
* StringUtils.indexOf("", "", 0) = 0
|
||||
* StringUtils.indexOf("", *, 0) = -1 (except when * = "")
|
||||
* StringUtils.indexOf("aabaabaa", "a", 0) = 0
|
||||
* StringUtils.indexOf("aabaabaa", "b", 0) = 2
|
||||
* StringUtils.indexOf("aabaabaa", "ab", 0) = 1
|
||||
|
|
Loading…
Reference in New Issue