12 October 2022

The upper filter is used to convert a string into uppercase. This function takes a string as parameter and converts all the lowercase alphabets present in the string to uppercase. All other numeric characters or special characters in the string remains unchanged.

Source code viewer
  1. {{ 'twig' | upper }}
  2.  
  3. {# outputs 'TWIG' #}
Programming Language: Twig