DefaultTemplateUtils
replace
Replaces all occurrences of a String within another String.
Parameters
Name | Type | Description |
---|---|---|
Text Content | String | Text to search and replace in |
arg1 | String | The string to search for |
arg2 | String | The String to replace it with |
contains
Checks if String contains a search String.
Parameters
Name | Type | Description |
---|---|---|
Text Content | String | Text to check |
arg1 | String | Text to find |
split
Splits the provided text.
Parameters
Name | Type | Description |
---|---|---|
Text Content | String | The text to split. |
arg1 | String | The characters used as the delimiters |
arg2 | String | The index of the splitted array to return |
toLowerCase
Returns the given string with each character converted to lower case.
Parameters
Name | Type | Description |
---|---|---|
Text Content | String | The string to convert to lower case |
toUpperCase
Returns the given string with each character converted to upper case.
Parameters
Name | Type | Description |
---|---|---|
Text Content | String | The string to convert to upper case |
format
Formats the given string with the specified format. The formatting uses the Java implementation of the String.format() method
Parameters
Name | Type | Description |
---|---|---|
Text Content | String | The string to format |
arg1 | String | The format string |
lowerCase
Converts a String to lower case.
Parameters
Name | Type | Description |
---|---|---|
Text Content | String | The String to lower case |
capitalize
Capitalizes a String changing the first letter to title case, no other letters are changed.
Parameters
Name | Type | Description |
---|---|---|
Text Content | String | The string to convert to capitalize |
formatNumber
Formats the given number with the specified format. The formatting uses the Java implementation of the String.format() method. For more information see: http://docs.oracle.com/javase/tutorial/java/data/numberformat.html
Parameters
Name | Type | Description |
---|---|---|
Text Content | String | The number to format |
arg1 | String | The format string |
deleteWhitespace
Deletes all whitespaces from a String.
Parameters
Name | Type | Description |
---|---|---|
Text Content | String | The string to delete whitespaces from. |
abbreviate
Abbreviates a String using ellipses. This will turn "Now is the time for all good men" into "Now is the time for...".
Parameters
Name | Type | Description |
---|---|---|
Text Content | String | Text to abbreviate |
arg1 | String | Maximum length of result String (minimum 4) |
getCurrentDate
Returns the current date in the given format.
Parameters
Name | Type | Description |
---|---|---|
Text Content | String | The format description to format the date |
getNonBreakingSpace
Returns a non-breaking whitespace character in order to control auto wrapping. (char code: 160)
Parameters
No parameters
getOperatingSystem
Returns the current operating system. (WINDOWS|LINUX|MAC|OTHER)
Parameters
No parameters
isFontAvailable
Returns whether the given font is available on the current system or not. (true|false)
Parameters
Name | Type | Description |
---|---|---|
Text Content | String | The font name as string |
getCurrentWorkingDirectory
Returns the absolute path to the current working directory
Parameters
No parameters
replaceUmlauts
Replaces all umlauts in the given string (ä->ae, ö->oe, ü->ue)
Parameters
Name | Type | Description |
---|---|---|
Text Content | String | Text to search and replace in |
insertUmlauts
Replaces the umlaut-replacments with umlauts (ae->ä, oe->ö, ue->ü)
Parameters
Name | Type | Description |
---|---|---|
Text Content | String | Text to search and replace in |
formatDate
Parses the given date string using the given input format and outputs a date string corresponding to the output format. y: year, D: day of year, M: month of year, d: day of month, H: hour of day, m: minute of hour, s: second of minute, z: time zone, E: day of week, w: week of weekyear
Parameters
Name | Type | Description |
---|---|---|
Text Content | String | The date string to format |
arg1 | String | The format for parsing the input date string |
arg2 | String | The format for the output date string |