mirror of
https://github.com/twigphp/Twig.git
synced 2026-11-07 03:35:16 +00:00
f0a0036892
including unit test and documentation
19 lines
255 B
ReStructuredText
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
|