count_characters - pfaciana/latte-js GitHub Wiki
Used to count the number of characters in a variable.
| Parameter Position | Type | Required | Default | Description |
|---|---|---|---|---|
| 1 | boolean | No | false | This determines whether or not to include white-space characters in the count. |
Template:
{$articleTitle = 'Cold Wave Linked to Temperatures.'}
{$articleTitle}
{$articleTitle|count_characters}
{$articleTitle|count_characters:true}output:
Cold Wave Linked to Temperatures.
29
33
see also count_characters in PHP Smarty documentation.