Add examples for containsAny(CharSequence, CharSequence...)

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1648066 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benedikt Ritter 2014-12-27 16:29:28 +00:00
parent a169e866c1
commit 5cb1ae6024
1 changed files with 10 additions and 0 deletions

View File

@ -1677,6 +1677,16 @@ public class StringUtils {
* A {@code null} CharSequence will return {@code false}. A {@code null} or zero
* length search array will return {@code false}.
* </p>
*
* <pre>
* StringUtils.containsAny(null, *) = false
* StringUtils.containsAny("", *) = false
* StringUtils.containsAny(*, null) = false
* StringUtils.containsAny(*, []) = false
* StringUtils.containsAny("abcd", "ab", "cd") = false
* StringUtils.containsAny("abc", "d", "abc") = true
* </pre>
*
*
* @param cs The CharSequence to check, may be null
* @param searchCharSequences The array of CharSequences to search for, may be null