PHP Classes

File: libs/Twig/doc/filters/format.rst

Recommend this page to a friend!
  Classes of william amed   Raptor 2   libs/Twig/doc/filters/format.rst   Download  
File: libs/Twig/doc/filters/format.rst
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Raptor 2
Framework that takes routes from annotations
Author: By
Last change:
Date: 8 years ago
Size: 392 bytes
 

Contents

Class file image Download
``format`` ========== The ``format`` filter formats a given string by replacing the placeholders (placeholders follows the `sprintf`_ notation): .. code-block:: jinja {{ "I like %s and %s."|format(foo, "bar") }} {# outputs I like foo and bar if the foo parameter equals to the foo string. #} .. _`sprintf`: http://www.php.net/sprintf .. seealso:: :doc:`replace<replace>`