private static boolean isEscapesCut(GrLiteral literal, int startOffset, int endOffset) {
    String rawContent = GrStringUtil.removeQuotes(literal.getText());
    int[] offsets = new int[rawContent.length() + 1];

    if (GrStringUtil.isSingleQuoteString(literal) || GrStringUtil.isDoubleQuoteString(literal)) {
      GrStringUtil.parseStringCharacters(rawContent, new StringBuilder(), offsets);
    }
    else if (GrStringUtil.isSlashyString(literal)) {
      GrStringUtil.parseRegexCharacters(rawContent, new StringBuilder(), offsets, true);
    }
    else if (GrStringUtil.isDollarSlashyString(literal)) {
      GrStringUtil.parseRegexCharacters(rawContent, new StringBuilder(), offsets, false);
    }

    int contentStart = literal.getTextRange().getStartOffset() + GrStringUtil.getStartQuote(literal.getText()).length();

    int relativeStart = startOffset - contentStart;
    int relativeEnd = endOffset - contentStart;

    return ArrayUtil.find(offsets, relativeStart) < 0 ||
           ArrayUtil.find(offsets, relativeEnd) < 0;
  }
private static boolean isEscapesCut(GrLiteral literal, int startOffset, int endOffset)