Template:hexnum/documentation

Hello, you have come here looking for the meaning of the word Template:hexnum/documentation. In DICTIOUS you will not only get to know all the dictionary meanings for the word Template:hexnum/documentation, but we will also tell you about its etymology, its characteristics and you will know how to say Template:hexnum/documentation in singular and plural. Everything you need to know about the word Template:hexnum/documentation you have here. The definition of the word Template:hexnum/documentation will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofTemplate:hexnum/documentation, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.
Documentation for Template:hexnum.
This page contains usage information, categories, interwiki links and other content describing the template.

Usage

Used for testing for hexadecimal numbers. Returns 1 if the condition is satisfied, an empty string otherwise:

Wikitext Result
{{#if:{{hexnum|FFFFFF|digits=6}}
  | Yes, hex!
  | Nope, something else.
}}
Yes, hex!

Parameters

|1=
Hexadecimal number.
|allow_empty=
Return 1 if |1= is empty.
|digits=
Fail if |1= is given but does not have this number of digits. The template will generate an error if this parameter is supplied but is not a decimal number.

Examples using the {{#if:}} parser function

Wikitext Result
{{#if:{{hexnum|ABCDEF|digits=6}}
  | This is a hexadecimal number!
  | This is not a hexadecimal number!
}}
This is a hexdecimal number!
{{#if:{{hexnum|Hello, world!|digits=6}}
  | This is a hexadecimal number!
  | This is not a hexadecimal number!
}}
This is not a hexadecimal number!