'Handlebar helper for truncating or replacing characters in a string

I have a Sendgrid template with a dynamically substituted value (which is a string e.g. {{myValue}}.

There is a formatDate helper (for date values), but are there any helper classes that would allow me to ensure that the string is output to a maximum number of characters, or to do any string/regex manipulation? I assume I am limited to Sendgrid's built-in helpers?



Solution 1:[1]

You are limited to SendGrid's helpers. However, since you send the data to SendGrid, I would recommend that you truncate the data before you send it.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 philnash