int (final CharSequence chars, int startOffset, int endOffset, String charsToFind) { while(startOffset < endOffset) { if (charsToFind.indexOf(chars.charAt(startOffset)) != -1) { return startOffset; } ++startOffset; } return startOffset; }