4 .. versionadded:: 1.6.2
5 The trim filter was added in Twig 1.6.2.
7 The ``trim`` filter strips whitespace (or other characters) from the beginning
12 {{ ' I like Twig. '|trim }}
14 {# outputs 'I like Twig.' #}
16 {{ ' I like Twig.'|trim('.') }}
18 {# outputs ' I like Twig' #}
22 Internally, Twig uses the PHP `trim`_ function.
27 * ``character_mask``: The characters to strip
29 .. _`trim`: http://php.net/trim