private static char getQuoteAt(@NotNull CharSequence text, int offset) {
    if (offset < 0 || offset >= text.length()) return 0;
    final char ch = text.charAt(offset);
    return (ch == '\'' || ch == '\"') ? ch : 0;
  }
private static char getQuoteAt(@NotNull CharSequence text, int offset)