public class StringUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static char[] |
HEX_CHARS |
Constructor and Description |
---|
StringUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
javaScriptString(java.lang.String value)
Generate JavaScript code that evaluates to the supplied string.
|
static java.lang.String |
toHexString(byte[] bytes)
Returns a string representation of the byte array as a series of
hexadecimal characters.
|
public static java.lang.String javaScriptString(java.lang.String value)
ScriptRuntime.escapeString(String)
. The difference is that we quote with either " or ' depending on
which one is used less inside the string.public static java.lang.String toHexString(byte[] bytes)
bytes
- byte array to convert