Formatting strings

Use these system functions to reformat strings, and add or remove characters from strings:

Examples Returns
system.toUpperCase("Is there anything else?") IS THERE ANYTHING ELSE?

system.toLowerCase("Is there anything else?")

is there anything else?
system.toProperCase("proper case") Is There Anything Else?
system.replace("Jack and Jill"," and ") JackJill
system.replace("Jack and Jill"," and ", " why not ") Jack why not Jill
The function system.replace(string, deleteChars, addChars) is case sensitive:
  • string is the string to format.
  • deleteChars is the substring to remove. Only the first match is replaced.
  • addChars is the character(s) to insert in place of deleteChars. If deleteChars is an empty string ("") then the character(s) are inserted at the beginning of the string.
Enclose each parameter in quotes (single or double).

Examples:

Examples

For example in the Send to user of a message, changes the case of the string enclosed in quotes:

Do you want more information about our {system.toProperCase("product range")}?

Changes the case of the product variable once evaluated:

Do you want more information about our {system.toProperCase(product)}?