Package com.google.gwt.util.tools.shared
Class StringUtils
java.lang.Object
com.google.gwt.util.tools.shared.StringUtils
String utility methods.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
Field Details
-
HEX_CHARS
public static char[] HEX_CHARS
-
-
Constructor Details
-
StringUtils
public StringUtils()
-
-
Method Details
-
javaScriptString
Generate JavaScript code that evaluates to the supplied string. Adapted fromScriptRuntime.escapeString(String)
. The difference is that we quote with either " or ' depending on which one is used less inside the string. -
toHexString
Returns a string representation of the byte array as a series of hexadecimal characters.- Parameters:
bytes
- byte array to convert- Returns:
- a string representation of the byte array as a series of hexadecimal characters
-