ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、视频、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# `format` The `format` filter formats a given string by replacing the placeholders(placeholders follows the [sprintf](http://www.php.net/sprintf) [http://www.php.net/sprintf] notation): <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 2 3 4</pre></div></td><td class="code"><div class="highlight"><pre>{{ "I like %s and %s."|format(foo, "bar") }} {# outputs I like foo and bar if the foo parameter equals to the foo string. #} </pre></div></td></tr></table> See also [*replace*](#)