public final class JavaEscape extends Object
Modifier and Type | Method and Description |
---|---|
static String |
escape(String string,
boolean charValue,
boolean unicodeEscape)
Escapes characters in the target text.
|
static String |
unescape(String string)
Decodes an escaped string.
|
public static String escape(String string, boolean charValue, boolean unicodeEscape)
\
(backslash) and non-printable characters like as Java characters,
for creating string or character literals.string
- the target textcharValue
- true
to escape "
, or false
to escape '
unicodeEscape
- true
to escape after U+007f characters, or false
to keep thempublic static String unescape(String string)
string
- the escaped stringIllegalArgumentException
- if the escaped string is malformedCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.