|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.syncclient.common.StringTools
public class StringTools
Utility class that groups string manipulation functions.
Constructor Summary | |
---|---|
StringTools()
|
Method Summary | |
---|---|
static java.lang.String |
escapeXml(java.lang.String str)
Escapes the characters in a String using XML entities. |
static boolean |
isEmpty(java.lang.String s)
Returns true if the given string is null or zero-length, false otherwise. |
static java.lang.String |
join(java.lang.String[] array)
Joins the given Strin[] in a comma separated String |
static java.lang.String |
replaceSpecial(java.lang.String s)
Replaces special characters from the given string with an underscore ('_'). |
static java.lang.String[] |
split(java.lang.String s)
Splits a comma separated values string into an array of strings. |
static java.lang.String |
unescapeXml(java.lang.String str)
Unescapes a string containing XML entity escapes to a string containing the actual Unicode characters corresponding to the escapes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringTools()
Method Detail |
---|
public static java.lang.String[] split(java.lang.String s)
s
- the comma separated values list - NOT NULL
public static java.lang.String join(java.lang.String[] array)
array
- the String[] to join - NOT NULL
public static boolean isEmpty(java.lang.String s)
s
- the string to check
public static java.lang.String replaceSpecial(java.lang.String s)
s
- the string to replace.
public static java.lang.String escapeXml(java.lang.String str)
Escapes the characters in a String
using XML entities.
Supports only the four basic XML entities (gt, lt, quot, amp). Does not support DTDs or external entities.
str
- the String
to escape, may be null
String
, null
if null string inputunescapeXml(java.lang.String)
public static java.lang.String unescapeXml(java.lang.String str)
Unescapes a string containing XML entity escapes to a string containing the actual Unicode characters corresponding to the escapes.
Supports only the four basic XML entities (gt, lt, quot, amp). Does not support DTDs or external entities.
str
- the String
to unescape, may be null
String
, null
if null string inputescapeXml(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |