Class StringUtils

java.lang.Object
com.google.gwt.util.tools.shared.StringUtils

public class StringUtils extends Object
String utility methods.
  • Field Details

    • HEX_CHARS

      public static char[] HEX_CHARS
  • Constructor Details

    • StringUtils

      public StringUtils()
  • Method Details

    • javaScriptString

      public static String javaScriptString(String value)
      Generate JavaScript code that evaluates to the supplied string. Adapted from ScriptRuntime.escapeString(String) . The difference is that we quote with either " or ' depending on which one is used less inside the string.
    • toHexString

      public static 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