count_characters

count_characters — This is used to count the number of characters in a variable/string

  • value: the string to process
  • count_spaces: if true, the white-space characters are counted as well
Examples:

if $name equal to "Cold Wave Linked to Temperatures."


    {$name}
    {$name|count_characters}
    {$name|count_characters:true}    
    

The above example will output:


    Cold Wave Linked to Temperatures.
    29
    33