PHP Classes

File: Library/vendor/twig/twig/doc/filters/trim.rst

Recommend this page to a friend!
  Classes of Duong Huynh Nghia   Lego PHP   Library/vendor/twig/twig/doc/filters/trim.rst   Download  
File: Library/vendor/twig/twig/doc/filters/trim.rst
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Lego PHP
Blog and shopping cart system
Author: By
Last change:
Date: 7 years ago
Size: 523 bytes
 

Contents

Class file image Download
``trim`` ======== .. versionadded:: 1.6.2 The ``trim`` filter was added in Twig 1.6.2. The ``trim`` filter strips whitespace (or other characters) from the beginning and end of a string: .. code-block:: jinja {{ ' I like Twig. '|trim }} {# outputs 'I like Twig.' #} {{ ' I like Twig.'|trim('.') }} {# outputs ' I like Twig' #} .. note:: Internally, Twig uses the PHP `trim`_ function. Arguments --------- * ``character_mask``: The characters to strip .. _`trim`: http://php.net/trim