org.coode.string
Class EscapeUtils

java.lang.Object
  extended by org.coode.string.EscapeUtils

public class EscapeUtils
extends java.lang.Object

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 16-Apr-2008


Constructor Summary
EscapeUtils()
           
 
Method Summary
static java.lang.String escapeString(java.lang.String s)
          Escapes quotes and backslashes in a string.
static java.lang.String escapeXML(java.lang.String s)
           
static java.lang.String unescapeString(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EscapeUtils

public EscapeUtils()
Method Detail

escapeString

public static java.lang.String escapeString(java.lang.String s)
Escapes quotes and backslashes in a string. Double quotes are replaced with a backslash followed by a double quote, and backslashes are replaced with a double backslash.

Parameters:
s - The string to be escaped
Returns:
The escaped string.

unescapeString

public static java.lang.String unescapeString(java.lang.String s)

escapeXML

public static java.lang.String escapeXML(java.lang.String s)