string_format - pfaciana/latte-js GitHub Wiki
This is a way to format strings, such as decimal numbers and such. Use the syntax for sprintf() for the formatting.
This modifier uses Javascript port of PHP function sprintf(). You can find one at phpjs.org
| Parameter Position | Type | Required | Default | Description |
|---|---|---|---|---|
| 1 | string | Yes | n/a | This is what format to use. (sprintf) |
Template:
{$articleTitle = 23.5787446}
{$number}
{$number|string_format:"%.2f"}
{$number|string_format:"%d"}output:
23.5787446
23.58
23