public class Util
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static char[] |
HEX_CHARS |
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
private static void |
appendHexJavaScriptRepresentation(int codePoint,
java.lang.Appendable out)
Returns a JavaScript representation of the character in a hex escaped
format.
|
static void |
appendHexJavaScriptRepresentation(java.lang.StringBuilder sb,
char c) |
(package private) static java.lang.String |
escapeString(java.lang.String s)
Escapes the given string to a double quoted (") JavaScript/JSON string
|
private static java.lang.String |
escapeString(java.lang.String s,
char quote,
java.lang.String doublequoteEscape,
java.lang.String singlequoteEscape,
java.lang.String backslashEscape)
Helper to escape JavaScript string as well as regular expression
|
static java.lang.String escapeString(java.lang.String s)
private static java.lang.String escapeString(java.lang.String s, char quote, java.lang.String doublequoteEscape, java.lang.String singlequoteEscape, java.lang.String backslashEscape)
public static void appendHexJavaScriptRepresentation(java.lang.StringBuilder sb, char c)
private static void appendHexJavaScriptRepresentation(int codePoint, java.lang.Appendable out) throws java.io.IOException
codePoint
- The code point to append.out
- The buffer to which the hex representation should be appended.java.io.IOException