ecx:capitalizeWords
- 1 Minute to read
- Print
- DarkLight
ecx:capitalizeWords
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
The function ecx:capitalizeWords converts the first letter of every word in a string to upper case. The value returned is a string data type.
Example
The customer's last travel destination is stored in a custom attribute. This value is stored in lower-case text. To use this value in a message, the text string must be formatted correctly. The function ecx:capitalizeFirstLetter does not correct the capitalization for city names with more than one word, for example, San Diego.
The following example uses the ecx:capitalizeWords function to format the city names and insert them in a message:
<%${ecx:capitalizeWords(user.CustomAttribute['Last Destination'])}%>
Structure
ecx:capitalizeWords(string)
Parameters
Parameter | Description |
---|---|
string | Specifies the target string. |
Was this article helpful?