private static int getEscapedCharIndex(@NotNull String text, int start, char escapedChar) {
    int i = start;
    while (i < text.length()) {
      char c = text.charAt(i);
      if (c == '\\') {
        if (i + 1 < text.length() && text.charAt(i + 1) == escapedChar) return i;
        i += 2;
      }
      else {
        i++;
      }
    }
    return -1;
  }
private static int getEscapedCharIndex(@NotNull String text, int start, char escapedChar)