Skip to content

Latest commit

 

History

History
18 lines (10 loc) · 251 Bytes

abs.rst

File metadata and controls

18 lines (10 loc) · 251 Bytes

abs

The abs filter returns the absolute value.

{# number = -5 #}

{{ number|abs }}

{# outputs 5 #}

Note

Internally, Twig uses the PHP abs function.