int (final @NotNull CharSequence s, final @NotNull String chars, final int start, int end) { if (chars.isEmpty()) return -1; end = Math.min(end, s.length()); for (int i = Math.max(start, 0); i < end; i++) { if (containsChar(chars, s.charAt(i))) return i; } return -1; }