Movable Type Documentation > Appendices > Appendix: Template Tag Modifiers

sprintf

Type: modifier

A general purpose formatter based on the sprintf command found in a number of programming languages. The value of the attribute should be the format string. The tag value will be passed in as the argument to sprintf.

Example

The following example will convert the value of tagname into a floating point number with a precision of 2.

See also

This page was last updated on 2007-08-10, 16:38.  

Submit a User Contributed Note

User contributed notes are a great way to share the knowledge you have gained in using Movable Type.

If you have a technical question or problem, please visit Movable Type Support.

(If you haven't left a note here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)