Template:Ifnumber

From Discworld MUD Wiki
Jump to: navigation, search

[edit]

Documentation
 

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.