Format
Format numbers and strings for display.
Format
currencyConverts a numeric value between currency units by scaling it with a
ratio of unit sizes: the result is value * toUnits / fromUnits, truncated to a
whole integer.{{ price | currency:1,100 }}decimalFormats a number with the given number of decimal places,
rounding to the nearest value at that precision.{{ ratio | decimal:4 }}formatRenders a date/time value using a PHP-style date layout (Y is the
4-digit year, m the zero-padded month, d the day, H:i:s the time, and so on).{{ at | format:'Y-m-d' }}lengthReturns the number of UTF-8 bytes in a string, so a multi-byte
character such as "é" counts as more than one.{{ name | length }}line_numbersPrepends each line of the input with a line number counting up
from a given start line, so line_numbers:6 renders a block as if it began at
line six.{{ body | line_numbers:6 }}