Github user chtompki commented on the issue:

    https://github.com/apache/commons-lang/pull/251
  
    Okay. It seems that we'll want some clearer documentation. Note that the 
javadoc on `indexOf` in the jdk follows:
    
    ```java
    /**
         * Returns the index within this string of the first occurrence of the
         * specified character, starting the search at the specified index.
         * <p>
         * If a character with value <code>ch</code> occurs in the
         * character sequence represented by this <code>String</code>
         * object at an index no smaller than <code>fromIndex</code>, then
         * the index of the first such occurrence is returned. For values
         * of <code>ch</code> in the range from 0 to 0xFFFF (inclusive),
         * this is the smallest value <i>k</i> such that:
         * <blockquote><pre>
         * (this.charAt(<i>k</i>) == ch) && (<i>k</i> &gt;= fromIndex)
         * </pre></blockquote>
         * is true. For other values of <code>ch</code>, it is the
         * smallest value <i>k</i> such that:
         * <blockquote><pre>
         * (this.codePointAt(<i>k</i>) == ch) && (<i>k</i> &gt;= fromIndex)
         * </pre></blockquote>
         * is true. In either case, if no such character occurs in this
         * string at or after position <code>fromIndex</code>, then
         * <code>-1</code> is returned.
         *
         * <p>
         * There is no restriction on the value of <code>fromIndex</code>. If it
         * is negative, it has the same effect as if it were zero: this entire
         * string may be searched. If it is greater than the length of this
         * string, it has the same effect as if it were equal to the length of
         * this string: <code>-1</code> is returned.
         *
         * <p>All indices are specified in <code>char</code> values
         * (Unicode code units).
         *
         * @param   ch          a character (Unicode code point).
         * @param   fromIndex   the index to start the search from.
         * @return  the index of the first occurrence of the character in the
         *          character sequence represented by this object that is 
greater
         *          than or equal to <code>fromIndex</code>, or <code>-1</code>
         *          if the character does not occur.
         */
    ```
    
    Let's see if we can get something along these lines on both 
CharSequenceUtils as well as StringUtils. Furthermore, I think we should stick 
as closely to the implementation in `String` as possible simply generalizing to 
`CharSequence`'s.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to