int (@NotNull CharSequence buffer, int offset, @NotNull String chars) { if (offset + 1 >= buffer.length()) return offset; if (!isSuitable(chars, buffer.charAt(offset))) return offset; offset++; while (true) { if (offset >= buffer.length()) return offset - 1; char c = buffer.charAt(offset); if (!isSuitable(chars, c)) return offset - 1; offset++; } }