Module ical4j.core

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 Details

    • 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:
  • Method Details

    • quote

      public static String quote(Object aValue)
      Convenience method for adding quotes. The specified object is converted to a string representation by calling its toString() method.
      Parameters:
      aValue - an object to quote
      Returns:
      a quoted string
    • quote

      public static String quote(URI uri)
    • 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
    • valueOf

      public static String valueOf(Object object)
      Wraps java.lang.String.valueOf() to return an empty string where the specified object is null.
      Parameters:
      object - an object instance
      Returns:
      a string representation of the object