]> git.immae.eu Git - github/wallabag/wallabag.git/blob - vendor/twig/twig/doc/filters/format.rst
twig implementation
[github/wallabag/wallabag.git] / vendor / twig / twig / doc / filters / format.rst
1 ``format``
2 ==========
3
4 The ``format`` filter formats a given string by replacing the placeholders
5 (placeholders follows the `sprintf`_ notation):
6
7 .. code-block:: jinja
8
9 {{ "I like %s and %s."|format(foo, "bar") }}
10
11 {# returns I like foo and bar
12 if the foo parameter equals to the foo string. #}
13
14 .. _`sprintf`: http://www.php.net/sprintf
15
16 .. seealso:: :doc:`replace<replace>`