| java.lang.Object dtw.webmail.util.StringUtil
StringUtil | public class StringUtil (Code) | | Class that contains static utility methods to
handle Strings.
author: Dieter Wimberger version: 0.9.7 07/02/2003 |
Method Summary | |
public static boolean | contains(String[] strs, String str) | public static String | getFormattedDate() Returns now, as String formatted
with DEFAULT_DATEFORMAT. | public static String | join(String[] items, String delim) Method that joins an array of strings into a string
with delimited fields
Parameters: items - an array of strings. Parameters: delim - String that represents the delimiter. | public static String | repairPath(String path) This method is used to circumvent a bug (or feature) in the
URLClassLoader, which prevents it from being able to use file
url's with path strings which contain a ..
Example:
/usr/local/tomcat/bin/../webapps/webmail/WEB-INF/i18n/
does not properly work, whereas
/usr/local/tomcat/webapps/webmail/WEB-INF/i18n/
which represents the same (for the File class it makes
no difference whatsoever), but works. | public static String[] | split(String str, String delim) Method that splits a string with delimited fields
into an array of strings.
Parameters: str - String with delimited fields. Parameters: delim - String that represents the delimiter. |
DEFAULT_DATEFORMAT | public static SimpleDateFormat DEFAULT_DATEFORMAT(Code) | | Defines a simple date format, to be used for returning the
formatted date.
|
getFormattedDate | public static String getFormattedDate()(Code) | | Returns now, as String formatted
with DEFAULT_DATEFORMAT.
now as formatted String. |
join | public static String join(String[] items, String delim)(Code) | | Method that joins an array of strings into a string
with delimited fields
Parameters: items - an array of strings. Parameters: delim - String that represents the delimiter. the String that contains the delimited list. |
repairPath | public static String repairPath(String path)(Code) | | This method is used to circumvent a bug (or feature) in the
URLClassLoader, which prevents it from being able to use file
url's with path strings which contain a ..
Example:
/usr/local/tomcat/bin/../webapps/webmail/WEB-INF/i18n/
does not properly work, whereas
/usr/local/tomcat/webapps/webmail/WEB-INF/i18n/
which represents the same (for the File class it makes
no difference whatsoever), but works.
|
split | public static String[] split(String str, String delim)(Code) | | Method that splits a string with delimited fields
into an array of strings.
Parameters: str - String with delimited fields. Parameters: delim - String that represents the delimiter. the String[] that contains all splitted fields. |
|
|