🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
``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>`