Package net.fortuna.ical4j.util
Class Strings
- java.lang.Object
-
- net.fortuna.ical4j.util.Strings
-
public final class Strings extends Object
$Id$ [23-Apr-2004] Utility methods for working with parameters.
-
-
Field Summary
Fields Modifier and Type Field Description static String
LINE_SEPARATOR
A string used to denote the start (and end) of iCalendar content lines.static Pattern
PARAM_QUOTE_PATTERN
Defines a regular expression representing all parameter strings that should be quoted.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
escape(String aValue)
Convenience method for escaping special characters.static String
quote(Object aValue)
Convenience method for adding quotes.static String
quote(URI uri)
static String
unescape(String aValue)
Convenience method for replacing escaped special characters with their original form.static String
unquote(String aValue)
Convenience method for removing surrounding quotes from a string value.static String
valueOf(Object object)
Wrapsjava.lang.String.valueOf()
to return an empty string where the specified object is null.
-
-
-
Field Detail
-
PARAM_QUOTE_PATTERN
public static final Pattern PARAM_QUOTE_PATTERN
Defines a regular expression representing all parameter strings that should be quoted.
-
LINE_SEPARATOR
public static final String LINE_SEPARATOR
A string used to denote the start (and end) of iCalendar content lines.- See Also:
- Constant Field Values
-
-
Method Detail
-
quote
public static String quote(Object aValue)
Convenience method for adding quotes. The specified object is converted to a string representation by calling itstoString()
method.- Parameters:
aValue
- an object to quote- Returns:
- a quoted string
-
unquote
public static String unquote(String aValue)
Convenience method for removing surrounding quotes from a string value.- Parameters:
aValue
- a string to remove quotes from- Returns:
- an un-quoted string
-
escape
public static String escape(String aValue)
Convenience method for escaping special characters.- Parameters:
aValue
- a string value to escape- Returns:
- an escaped representation of the specified string
-
unescape
public static String unescape(String aValue)
Convenience method for replacing escaped special characters with their original form.- Parameters:
aValue
- a string value to unescape- Returns:
- a string representation of the specified string with escaped characters replaced with their original form
-
-