Actions

Template

Difference between revisions of "Numformat"

From NEC Retro

(Created page with "{{#ifexpr:{{#len:{{{1|}}}}}>3 |{{#if:{{#pos:{{{1|}}}|,}}|{{#replace:{{{1|}}}|,}} |{{clearvar|nfout}}{{#vardefine:pos|-3}}{{#while:|{{#ifexpr:({{#var:pos}}*-1)<{{#len:{{{1|}}}}...")
 
m (Text replacement - "Category:NEC Retro templates" to "Category:Templates")
 
Line 14: Line 14:
 
* <nowiki>{{numformat|123456789}}</nowiki> -> {{numformat|123456789}}
 
* <nowiki>{{numformat|123456789}}</nowiki> -> {{numformat|123456789}}
  
[[Category:NEC Retro templates]]</noinclude>
+
[[Category:Templates]]</noinclude>

Latest revision as of 10:24, 1 January 2022

Inserts or removes commas from numbers that are 1,000 or larger.

Usage

  • {{numformat|123}} -> 123
  • {{numformat|1234}} -> 1,234
  • {{numformat|1,234}} -> 1234
  • {{numformat|1234567890}} -> 1,234,567,890
  • {{numformat|123456789}} -> 123,456,789