code: public int indexIn(CharSequence sequence) {
      int length = sequence.length();
      for (int i = 0; i < length; i++) {
        if (matches(sequence.charAt(i))) {
          return i;
        }
      }
      return -1;
    }
docs: Returns the index of the first matching character in a character sequence, or {@code -1} if no
  matching character is present.
  
  <p>The default implementation iterates over the sequence in forward order calling {@link
  #matches} for each character.
  
  @param sequence the character sequence to examine from the beginning
  @return an index, or {@code -1} if no character matches