Enum Class JavaScriptEscaper.Option

java.lang.Object
java.lang.Enum<JavaScriptEscaper.Option>
org.cthing.escapers.JavaScriptEscaper.Option
All Implemented Interfaces:
Serializable, Comparable<JavaScriptEscaper.Option>, Constable
Enclosing class:
JavaScriptEscaper

public static enum JavaScriptEscaper.Option extends Enum<JavaScriptEscaper.Option>
Escaping options.
  • Enum Constant Details

    • ESCAPE_NON_ASCII

      public static final JavaScriptEscaper.Option ESCAPE_NON_ASCII
      Escape characters above the ASCII range (i.e. ch > 0x7F). By default, only ASCII control characters and certain printable ASCII characters are escaped. Specifying this option causes all ISO Latin-1, Unicode BMP and surrogate pair characters to be escaped (i.e. one or two \uXXXX).
  • Method Details

    • values

      public static JavaScriptEscaper.Option[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static JavaScriptEscaper.Option valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null