arturobernalg commented on a change in pull request #644:
URL: https://github.com/apache/commons-lang/pull/644#discussion_r523184647



##########
File path: src/main/java/org/apache/commons/lang3/StringUtils.java
##########
@@ -2854,6 +2854,39 @@ public static int indexOfAny(final CharSequence cs, 
final String searchChars) {
         return indexOfAny(cs, searchChars.toCharArray());
     }
 
+    /**
+     * <p>Search a CharSequence to find the first index of any
+     * character in the given set of characters starting with
+     * a given index.</p>
+     *
+     * <p>A {@code null} String will return {@code -1}.
+     * A {@code null} search string will return {@code -1}.</p>
+     *
+     * <pre>
+     * StringUtils.indexOfAny(null, 0, *)            = -1
+     * StringUtils.indexOfAny("", 0, *)              = -1
+     * StringUtils.indexOfAny(*, 0, null)            = -1
+     * StringUtils.indexOfAny(*, 0, "")              = -1
+     * StringUtils.indexOfAny("zzabyycdxx", 0, "za") = 0
+     * StringUtils.indexOfAny("zzabyycdxx", 0, "by") = 3
+     * StringUtils.indexOfAny("aba", 0, "z")         = -1
+     * StringUtils.indexOfAny("aba", 1, "a")         = 1
+     * StringUtils.indexOfAny("aba", -1, "a")        = -1
+     * </pre>
+     *
+     * @param cs  the CharSequence to check, may be null
+     * @param beginIndex  the start position to search
+     * @param searchChars  the chars to search for, may be null
+     * @return the index of any of the chars, -1 if no match,null input or  
the beginIndex smaller than 0
+     * @since 3.2

Review comment:
       Hi @garydgregory Which would be correct?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to