
| Current Path : /var/www/html1/testsite/vendor/twig/twig/doc/filters/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html1/testsite/vendor/twig/twig/doc/filters/format.rst |
``format``
==========
The ``format`` filter formats a given string by replacing the placeholders
(placeholders follows the `sprintf`_ notation):
.. code-block:: twig
{{ "I like %s and %s."|format(foo, "bar") }}
{# outputs I like foo and bar
if the foo parameter equals to the foo string. #}
.. _`sprintf`: https://secure.php.net/sprintf
.. seealso:: :doc:`replace<replace>`