Package com.google.gwt.util.tools.shared
Class StringUtils
- java.lang.Object
-
- com.google.gwt.util.tools.shared.StringUtils
-
public class StringUtils extends java.lang.Object
String utility methods.
-
-
Field Summary
Fields Modifier and Type Field Description static char[]
HEX_CHARS
-
Constructor Summary
Constructors Constructor Description StringUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
javaScriptString
public static java.lang.String javaScriptString(java.lang.String value)
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
public static java.lang.String toHexString(byte[] bytes)
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
-
-