format

The format filter formats a given string by replacing the placeholders (placeholders follows the sprintf notation):

フォーマット フィルターは、プレースホルダーを置き換えることによって、指定された文字列をフォーマットします (プレースホルダーは sprintf 表記に従います)。
1
2
3
4
{{ "I like %s and %s."|format(foo, "bar") }}

{# outputs I like foo and bar
   if the foo parameter equals to the foo string. #}

See also

こちらもご覧ください

replace

交換