TextRange (@NotNull String s) { final Pair<String, String> quotes = getQuotes(s); if (quotes != null) { return TextRange.create(quotes.getFirst().length(), s.length() - quotes.getSecond().length()); } return TextRange.allOf(s); }