org.jacaranda.verifier
Class Strings

java.lang.Object
  extended by org.jacaranda.verifier.Strings

public class Strings
extends java.lang.Object

String utility functions.


Constructor Summary
Strings()
           
 
Method Summary
static java.lang.String escape(int c)
          Return an escape (using \{t,n,r,\,",uHHHH}) for the code unit c.
static boolean isIdentifierPart(int c)
          Is c a valid IdentifierPart code unit in ES5?
static boolean isIdentifierStart(int c)
          Is c a valid IdentifierStart code unit in ES5?
static boolean isPrintable(java.lang.String s)
          Does s consist only of printable ASCII code units (U+0020..U+007E)?
static java.lang.String quote(int c)
          Quote code unit c as a valid Jacaranda, JSON, or Java double-quoted string literal, suitable for embedding in HTML or XML CDATA (but not outside CDATA).
static java.lang.String quote(java.lang.String s)
          Quote s as a valid Jacaranda, JSON, or Java double-quoted string literal, suitable for embedding in HTML or XML CDATA (but not outside CDATA).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Strings

public Strings()
Method Detail

isIdentifierPart

public static boolean isIdentifierPart(int c)
Is c a valid IdentifierPart code unit in ES5?


isIdentifierStart

public static boolean isIdentifierStart(int c)
Is c a valid IdentifierStart code unit in ES5?


isPrintable

public static boolean isPrintable(java.lang.String s)
Does s consist only of printable ASCII code units (U+0020..U+007E)?


quote

public static java.lang.String quote(java.lang.String s)
Quote s as a valid Jacaranda, JSON, or Java double-quoted string literal, suitable for embedding in HTML or XML CDATA (but not outside CDATA). Escaping may be used conservatively.


quote

public static java.lang.String quote(int c)
Quote code unit c as a valid Jacaranda, JSON, or Java double-quoted string literal, suitable for embedding in HTML or XML CDATA (but not outside CDATA). Escaping may be used conservatively.


escape

public static java.lang.String escape(int c)
Return an escape (using \{t,n,r,\,",uHHHH}) for the code unit c.