Template:Ifnumber/doc

From Discworld MUD Wiki
Revision as of 18:25, 24 July 2011 by Protectbot (Talk | contribs) (Protected "Template:Ifnumber/doc": Autoprotecting high volume page ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite)))

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

  This template returns argument 2 if argument 1 is a number otherwise it returns argument 3.

Parameters
1st: The string to test.
2nd: What to show if argument 1 is a number.
3rd: What to show if argument 1 is not a number.
Example
{{Ifnumber|22|Yes it's a number!|Nope, not a number.}}

This returns: Yes it's a number!


{{Ifnumber|Word|Yes it's a number!|Nope, not a number.}}

This returns: Nope, not a number.