edu.ksu.cis.kdd.util
Class StringUtil

java.lang.Object
  extended byedu.ksu.cis.kdd.util.StringUtil

public class StringUtil
extends java.lang.Object

Various string utility methods

Author:
Roby Joehanes

Method Summary
static java.lang.String mangleXMLString(java.lang.String s)
          Escape the string s to oblige to the XML rules (e.g.: "'" becomes ', "&" becomes &, and so on).
static java.lang.String unescapeString(java.lang.String str)
          Convert the escape codes in a string accordingly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

unescapeString

public static java.lang.String unescapeString(java.lang.String str)
Convert the escape codes in a string accordingly. Note: Octal escapes are not handled. Use the unicode instead.

Parameters:
str - String to mangle
Returns:
The mangled string

mangleXMLString

public static java.lang.String mangleXMLString(java.lang.String s)
Escape the string s to oblige to the XML rules (e.g.: "'" becomes ', "&" becomes &, and so on).

Parameters:
s - The raw string
Returns:
String The formatted string