lower

Description

Converts a string to lowercase.
 string lower( string input )
Lowercases a string.

Example

 {lower('Example Industry')} = example industry

Force Lowercase a User Name

Use Case: You pass a variable called “userName”, in which users can capitalize the letters however the like. For consistency, you want everyone’s userName to appear all lowercased in a template. Zephyr: zephyr example user_name cooluser
<p>Hello, {lower(userName)}</p>
Output: Hello, cooluser. Explanation: This script uses the lower() fuction to force lowercase every element of a string, in this instance, the each letter of the “user_name” custom field on a user profile.

Display a User’s Name in a Template in Title Case

Use Case: You pass a variable called “first_name”, in which users can capitalize the letters however the like. For consistency, you want the first letter of everyone’s name to be capitalized with the remaining letters to be lowercase. Zephyr: On the profile: <p>Hello, {title(lower(first_name))}</p> Output: Hello, Steve. Explanation: This script uses the lower() fuction to force lowercase every element of a string, in this instance, the each letter of the “first_name” custom field on a user profile. Additionally, since the order of operations is inside to outside, after the each letter has been lowercased, the title() function capitalizes the first letter of the value.
Top