Formats a Calendar object with Calendar.INPUT_DATE_TIME_PATTERN format of the current request locale, for example “MM/dd/yyyy h:mm a” for the locale en_US.
Interprets a Base64 encoded string as the byte stream representation of a string.
The given character encoding is used for decoding the byte stream into the
character representation.
The method throws an IllegalArgumentException in case the encoding
failed because of a mismatch between the input String and the character encoding.
Parameters:
base64 - the Base64 encoded string - should not be empty or null.
characterEncoding - the character encoding to read the input string - should not be empty or null.
Encodes the byte representation of the given string as Base64.
The string is converted into the byte representation using the given
character encoding.
The method throws an IllegalArgumentException in case the encoding
failed because of a mismatch between the input string and the character encoding.
Parameters:
str - the string to encode - should not be empty or null.
characterEncoding - the character encoding to read the input string - should not be empty or null.
Returns a formatted string using the specified format and arguments.
The formatting string is a Java MessageFormat expression, e.g.
format( "Message: {0}, {1}", "test", 10 ) would result in "Message: test, 10".
If a Collection is passed as the only argument, the elements of this collection
are used as arguments for the formatting.
Parameters:
format - Java like formatting string.
args - optional list of arguments or a collection, which are included into the result string
Formats a Calendar object with Calendar.INPUT_DATE_TIME_PATTERN format
of the current request locale, for example "MM/dd/yyyy h:mm a" for the
locale en_US. The used time zone is the time zone of the calendar object.
Parameters:
calendar - the calendar object.
Returns:
a string representation of the formatted calendar object.
Formats a Calendar object with the provided date format. The format is a
Java date format, like "yyy-MM-dd". The used time zone is the time zone
of the calendar object.
Parameters:
calendar - the calendar object to be printed
format - the format to use.
Returns:
a string representation of the formatted calendar object.
Formats a Calendar object with the date format defined by the provided locale
and Calendar pattern. The locale can be for instance the request.getLocale().
The used time zone is the time zone of the calendar object.
Parameters:
calendar - the calendar object to be printed
locale - the locale, which defines the date format to be used
pattern - the pattern is one of a calendar pattern e.g. SHORT_DATE_PATTERN as defined in the regional settings for the locale
Returns:
a string representation of the formatted calendar object.
Formats a date with the provided date format. The format is the
Java date format, like "yyyy-MM-DD". The locale of the calling context
request is used in formatting.
Returns a formatted integer number using the default integer format of the current
site. The method can be also called to format a floating number as integer.
Parameters:
number - the number to format.
Returns:
a formatted an integer number with the default integer format of the current
site.
Returns a formatted string using the specified number and format. The format is
Java number format, like "#,###.00". To format as an integer
number provide "0" as format string. The locale of the calling context
request is used in formatting.
Parameters:
number - the number to format.
format - the format to use.
Returns:
a formatted string using the specified number and format.
Returns a formatted number as a string using the specified number format in specified locale. The format is
Java number format, like "#,###.00". To format as an integer
number provide "0" as format string.
Parameters:
number - the number to format.
format - the format to use.
locale - the locale to use.
Returns:
a formatted number as a string using the specified number format in specified locale.
Returns a formatted string using the specified number and format. The format is
Java number format, like "#,###.00". To format as an integer
number provide "0" as format string. The locale of the calling context
request is used in formatting.
Decimal and grouping separators are used as specified in the locales regional settings (when configured, otherwise a fallback to the internal configuration is done).
Parameters:
number - the number to format.
format - the format to use.
Returns:
a formatted string using the specified number and format.
API Version:
Available from version 18.10.
In prior versions this method did fall back to Java formatting rules, instead of using the definitions in regional settings.
Returns a formatted number as a string using the specified number format in specified locale. The format is
Java number format, like "#,###.00". To format as an integer
number provide "0" as format string.
Decimal and grouping separators are used as specified in the locales regional settings (when configured, otherwise a fallback to the internal configuration is done).
Parameters:
number - the number to format.
format - the format to use.
locale - the locale to use.
Returns:
a formatted number as a string using the specified number format in specified locale.
API Version:
Available from version 18.10.
In prior versions this method did fall back to Java formatting rules, instead of using the definitions in regional settings.
This method provides cell padding functionality to the template.
Parameters:
str - the string to process
width - The absolute value of this number defines the width of the cell. A possitive number forces left, a negative number right alignment. A '0' doesn't change the string.
Convert a given string to an HTML-safe string.
This method substitutes characters that conflict with HTML syntax
(<,>,&,") and characters that are beyond the ASCII
chart (Unicode 160-255) to HTML 3.2 named character entities.
Converts a given string to a WML-safe string.
This method substitutes characters that conflict with WML syntax
(<,>,&,',"$) to WML named character entities.
Converts a given string to a XML-safe string.
This method substitutes characters that conflict with XML syntax
(<,>,&,',") to XML named character entities.