Files
Twig/doc/filters/abs.rst
T
Maarten de Keizer f0a0036892 Add abs filter
including unit test and documentation
2012-05-28 22:27:26 +02:00

19 lines
255 B
ReStructuredText

``abs``
=======
The ``abs`` filter returns the absolute value.
.. code-block:: jinja
{# number = -5 #}
{{ number|abs }}
{# outputs 5 #}
.. note::
Internally, Twig uses the PHP `abs`_ function.
.. _`abs`: http://php.net/abs