public class ControlCharacter extends Object implements CharSequence
| Modifier | Constructor and Description |
|---|---|
protected |
ControlCharacter(String description,
String charaterToEscape) |
| Modifier and Type | Method and Description |
|---|---|
char |
charAt(int index) |
String |
escape(String text)
Escapes the control character in the given text if necessary.
|
String |
getCharacterToEscape() |
int |
length() |
boolean |
mustEscape() |
CharSequence |
subSequence(int start,
int end) |
String |
toString() |
String |
unescape(String text)
Un-escapes the control character in the given text if necessary.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitchars, codePointspublic String getCharacterToEscape()
public boolean mustEscape()
true if this control character must be escaped in
text.public String escape(String text)
text - the text to escape.public String unescape(String text)
text - the text to un-escape.public int length()
length in interface CharSequencepublic char charAt(int index)
charAt in interface CharSequencepublic CharSequence subSequence(int start, int end)
subSequence in interface CharSequencepublic String toString()
toString in interface CharSequencetoString in class ObjectCopyright © 2022. All rights reserved.