The trimRight helper removes trailing whitespace from the end of a string, leaving leading whitespace unchanged. Use it when leading spaces are meaningful but trailing spaces should be discarded.
Syntax
{{trimRight value}}
value -- The string to process. Required.
Examples
Remove trailing spaces from a string
{{trimRight record.text}}
Input:
{ "record": { "text": " ABC " } }
Output: ABC (trailing space removed, leading space preserved)
Usage notes
- Only trailing whitespace is removed. Leading whitespace and interior spaces are not affected.
- To remove leading whitespace instead, use the trimLeft helper.
- To remove both leading and trailing whitespace, use the trim helper.