commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject svn commit: r1648066 - /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java
Date Sat, 27 Dec 2014 16:29:28 GMT
Author: britter
Date: Sat Dec 27 16:29:28 2014
New Revision: 1648066

URL: http://svn.apache.org/r1648066
Log:
Add examples for containsAny(CharSequence, CharSequence...)

Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java?rev=1648066&r1=1648065&r2=1648066&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java Sat
Dec 27 16:29:28 2014
@@ -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



Mime
View raw message