public static boolean isEscapedChar(@NotNull String text, int position) {
    int count = 0;
    for (int i = position - 1; i >= 0 && text.charAt(i) == '\\'; i--) {
      count++;
    }
    return count % 2 != 0;
  }
public static boolean isEscapedChar(@NotNull String text, int position)