int (@NotNull CharSequence sequence, @NotNull CharSequence infix, int start, int end) { for (int i = start; i <= end - infix.length(); i++) { if (startsWith(sequence, i, infix)) { return i; } } return -1; }