org.mmbase.util
Class Escape

java.lang.Object
  |
  +--org.mmbase.util.Escape

public class Escape
extends java.lang.Object

Class for escaping single quotes in a string, so that they can be safely included in a SQL statement.


Constructor Summary
Escape()
           
 
Method Summary
static java.lang.String singlequote(java.lang.String str)
          Escapes single quotes in a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Escape

public Escape()
Method Detail

singlequote

public static java.lang.String singlequote(java.lang.String str)
Escapes single quotes in a string. Escaping is done by doubling any quotes encountered. Strings that are rendered in such way can more easily be included in a SQL query.
Parameters:
str - the string to escape
Returns:
the escaped string


MMBase 2001