Fixing the javadoc for indexOfAnyBut(CharSequence, char[]) per Dirk Starke's report
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1032220 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
71de1b3e14
commit
80a39fba9b
|
@ -1555,13 +1555,14 @@ public class StringUtils {
|
|||
* A <code>null</code> or zero length search array will return <code>-1</code>.</p>
|
||||
*
|
||||
* <pre>
|
||||
* StringUtils.indexOfAnyBut(null, *) = -1
|
||||
* StringUtils.indexOfAnyBut("", *) = -1
|
||||
* StringUtils.indexOfAnyBut(*, null) = -1
|
||||
* StringUtils.indexOfAnyBut(*, []) = -1
|
||||
* StringUtils.indexOfAnyBut("zzabyycdxx",'za') = 3
|
||||
* StringUtils.indexOfAnyBut("zzabyycdxx", '') = 0
|
||||
* StringUtils.indexOfAnyBut("aba", 'ab') = -1
|
||||
* StringUtils.indexOfAnyBut(null, *) = -1
|
||||
* StringUtils.indexOfAnyBut("", *) = -1
|
||||
* StringUtils.indexOfAnyBut(*, null) = -1
|
||||
* StringUtils.indexOfAnyBut(*, []) = -1
|
||||
* StringUtils.indexOfAnyBut("zzabyycdxx", new char[] {'z', 'a'} ) = 3
|
||||
* StringUtils.indexOfAnyBut("aba", new char[] {'z'} ) = 0
|
||||
* StringUtils.indexOfAnyBut("aba", new char[] {'a', 'b'} ) = -1
|
||||
|
||||
* </pre>
|
||||
*
|
||||
* @param cs the CharSequence to check, may be null
|
||||
|
|
|
@ -596,7 +596,9 @@ public class StringUtilsEqualsIndexOfTest extends TestCase {
|
|||
assertEquals(-1, StringUtils.indexOfAnyBut("zzabyycdxx", new char[0]));
|
||||
assertEquals(3, StringUtils.indexOfAnyBut("zzabyycdxx", new char[] {'z','a'}));
|
||||
assertEquals(0, StringUtils.indexOfAnyBut("zzabyycdxx", new char[] {'b','y'}));
|
||||
assertEquals(0, StringUtils.indexOfAnyBut("ab", new char[] {'z'}));
|
||||
assertEquals(-1, StringUtils.indexOfAnyBut("aba", new char[] {'a', 'b'}));
|
||||
assertEquals(0, StringUtils.indexOfAnyBut("aba", new char[] {'z'}));
|
||||
|
||||
}
|
||||
|
||||
public void testIndexOfAnyBut_StringCharArrayWithSupplementaryChars() {
|
||||
|
|
Loading…
Reference in New Issue