TextRange () { String text = getText(); int start = 0; int end = text.length(); if (text.startsWith("\"") || text.startsWith("'")) { start++; } if (text.endsWith("\"") || text.endsWith("'")) { end--; } if (end <= start) { start = 0; end = text.length(); } return TextRange.create(start, end); }