upcase¶
The upcase filter is designed to convert all characters in a string to uppercase. It is a simple yet essential tool for text manipulation and formatting.
Functionality
- Strings: Takes a string as input.
- Conversion: Changes all lowercase letters to uppercase.
- Output: Returns a new string with all uppercase letters.
Syntax
ArgumentsThe upcase filter does not require any arguments.
Code Samples
Example 1: Uppercasing a Sentence
Output:
Example 2: Uppercasing Mixed Case Output:Outliers and Special Cases¶
- Empty Strings: If the input string is empty, the
upcasefilter returns an empty string. - Already Uppercase: If the input string is already in uppercase, the filter does not change the string.
- Non-String Input: If the input is not a string, the
upcasefilter might attempt to convert it to a string or return an error, depending on how Experience Builder handles type conversions. - Special Characters: Special characters and punctuation marks are not affected by the
upcasefilter.
Key Points¶
- The
upcasefilter is a basic but useful string manipulation tool for changing the case of text. - It is commonly used for formatting text for display in uppercase, especially for headings, titles, or emphasis.
- It can also be used in combination with other string filters like
downcaseorcapitalizefor more complex text transformations.