org.jopendocument.util
Class StringUtils.Escaper
java.lang.Object
org.jopendocument.util.StringUtils.Escaper
- Enclosing class:
- StringUtils
public static final class StringUtils.Escaper
- extends java.lang.Object
|
Constructor Summary |
StringUtils.Escaper(char esc,
char name)
A new escaper that will have esc as escape character. |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
StringUtils.Escaper
public StringUtils.Escaper(char esc,
char name)
- A new escaper that will have
esc as escape character.
- Parameters:
esc - the escape character, eg 'name - the character that will be appended to esc, eg with S all
occurrences of ' will be replaced by 'S
add
public StringUtils.Escaper add(char toRemove,
char escapedName)
getEscapedChars
public final java.util.Set<java.lang.Character> getEscapedChars()
escape
public final java.lang.String escape(java.lang.String s)
- Escape
s, so that the resulting string has none of
getEscapedChars().
- Parameters:
s - a string to escape.
- Returns:
- the escaped form.
unescape
public final java.lang.String unescape(java.lang.String escaped)
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object