xtom.parser.util
Class TextUtil

java.lang.Object
  extended byxtom.parser.util.TextUtil

public class TextUtil
extends java.lang.Object

This class contains a number of helper methods used for manipulating the strings.

Version:
$Revision: 1.1 $
Author:
Taras, Matej

Constructor Summary
TextUtil()
           
 
Method Summary
static java.lang.String addSlashes(java.lang.String text)
          If the " and ' were removed, puts them back.
static java.lang.String capitalizedFirstLetters(java.lang.String text)
          Takes the text consiting of one to many words, and converts first letter of each word to a UpperCase letter and the rest of the letters of the word are converted to the LowerCase.
static java.lang.String stripSlashes(java.lang.String text)
          Strips ' and " from the String to make sure that SQL statement doesn't produce any errors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextUtil

public TextUtil()
Method Detail

addSlashes

public static java.lang.String addSlashes(java.lang.String text)
If the " and ' were removed, puts them back.

Parameters:
text -
Returns:

stripSlashes

public static java.lang.String stripSlashes(java.lang.String text)
Strips ' and " from the String to make sure that SQL statement doesn't produce any errors.

Parameters:
text -
Returns:

capitalizedFirstLetters

public static java.lang.String capitalizedFirstLetters(java.lang.String text)
Takes the text consiting of one to many words, and converts first letter of each word to a UpperCase letter and the rest of the letters of the word are converted to the LowerCase.

Parameters:
text - Text
Returns:
The converted text.