public class StringUtil extends Object
String
utility methods.Constructor and Description |
---|
StringUtil() |
Modifier and Type | Method and Description |
---|---|
static String[] |
convertCsvStringToStringArray(String value) |
static Integer[] |
convertStringArrayToIntegerArray(String[] pStringArray) |
static int[] |
convertStringToIntArray(String value) |
static String |
escapeHtml(String s) |
static String |
escapeXml(String s)
Escapes special XML characters in a
String . |
static boolean |
isEmpty(String str)
Returns true if a
String is empty, else it returns true. |
static boolean |
isNumeric(String str)
Returns true if a
String is numeric, else it returns false. |
static String |
replaceString(String source,
String pattern,
String replace)
Replaces a part of a
String |
static String[] |
split(String str,
String delim)
Splits a
String |
static String |
unescapeXml(String s)
Unescapes special XML characters in a
String . |
public static String replaceString(String source, String pattern, String replace)
String
source
- the source String
pattern
- the pattern String
replace
- the replace String
String
public static String[] split(String str, String delim)
String
str
- the String
to splitdelim
- the String
delimiterpublic static boolean isEmpty(String str)
String
is empty, else it returns true.str
- a String
String
is empty, else it returns true.public static boolean isNumeric(String str)
String
is numeric, else it returns false.str
- a String
String
is numeric, else it returns falsepublic static String escapeXml(String s)
String
.
s
- a String
String
public static int[] convertStringToIntArray(String value)
public static String unescapeXml(String s)
String
.
s
- a String
String
© 1998- 2014 Escenic
Contact Escenic Support for bug submission or feature requests. For further API reference and developer documentation, see Technet. The Technet documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Escenic A/S, Sommerrogt. 13-15 Solli, 0255 Oslo, Norway.