public static int indexOf(char @NotNull [] buffer, char symbol, int fromIndex, int toIndex) {
    if (fromIndex < 0) {
      fromIndex = 0;
    }
    for (int i = fromIndex; i < toIndex; i++) {
      if (buffer[i] == symbol) {
        return i;
      }
    }
    return -1;
  }
public static int indexOf(char @NotNull [] buffer, char symbol, int fromIndex, int toIndex)