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();}

public ICharSequence ToStringEscaped(char[] enabledChars){StringBuilder result = new StringBuilder();for (int i = 0; i < this.Length; i++){if (this.chars[i] == '\\'){result.Append('\\');}else{foreach (char character in enabledChars){if (this.chars[i] == character && this.wasEscaped[i]){result.Append('\\');break;}}}result.Append(this.chars[i]);}return new StringCharSequence(result.ToString());}
