text: public String toStringEscaped(char[] enabledChars) {StringBuilder result = new StringBuilder();for (int i = 0; i < this.length(); i++) {if (this.chars[i] == '\\') {result.append('\\');} else {for (char character : enabledChars) {if (this.chars[i] == character && this.wasEscaped[i]) {result.append('\\');break;}}}result.append(this.chars[i]);}return result.toString();}