@Contract(pure = true)
  public static @NotNull String substringBeforeLast(@NotNull String text, @NotNull String subString, boolean includeLast) {
    int i = text.lastIndexOf(subString);
    if (i == -1) return text;
    return includeLast ? text.substring(0, i + subString.length()) : text.substring(0, i);
  }
@Contract(pure = true)
  public static @NotNull String substringBeforeLast(@NotNull String text, @NotNull String subString, boolean includeLast)