@SuppressWarnings("SameParameterValue")
  private static int lastIndexOf(@NotNull CharSequence s, char c, int start, int end) {
    start = Math.max(start, 0);
    for (int i = Math.min(end, s.length()) - 1; i >= start; i--) {
      if (s.charAt(i) == c) return i;
    }
    return -1;
  }
@SuppressWarnings("SameParameterValue")
  private static int lastIndexOf(@NotNull CharSequence s, char c, int start, int end)