public class StringUtils extends Object
Modifier and Type | Field and Description |
---|---|
static char[] |
HEX_CHARS |
Constructor and Description |
---|
StringUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
javaScriptString(String value)
Generate JavaScript code that evaluates to the supplied string.
|
static String |
toHexString(byte[] bytes)
Returns a string representation of the byte array as a series of
hexadecimal characters.
|
public static String javaScriptString(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 String toHexString(byte[] bytes)
bytes
- byte array to convertCopyright © 2018. All rights reserved.