int (@NotNull CharSequence s, char c, int start, int end, boolean caseSensitive) { end = Math.min(end, s.length()); for (int i = Math.max(start, 0); i < end; i++) { if (charsMatch(s.charAt(i), c, !caseSensitive)) return i; } return -1; }