Difference between revisions of "Template:Hex2dec"
Jump to navigation
Jump to search
imported>Plastikspork m (Protected Template:Hex2dec: Highly visible template ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite))) |
imported>Jimp (<includeonly></includeonly>) |
||
| Line 1: | Line 1: | ||
| − | {{#ifeq:{{padleft:|2|{{{1|0}}}}}|0x | + | <includeonly>{{#ifeq:{{padleft:|2|{{{1|0}}}}}|0x |
| {{Hex2dec/main | | {{Hex2dec/main | ||
| {{lc:{{{1|0}}}}} | | {{lc:{{{1|0}}}}} | ||
| Line 8: | Line 8: | ||
| {{Hex2dec/1 | 0x{{{1|0}}} }} | | {{Hex2dec/1 | 0x{{{1|0}}} }} | ||
}} | }} | ||
| − | }}<noinclude> | + | }}</includeonly><noinclude> |
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> | ||
Revision as of 16:15, 20 June 2011
| 30px | This template uses Lua: |
Usage
{{hex2dec|0x0000}} → 0{{hex2dec|0xA0}} → 0{{hex2dec|0x7C0}} → 0{{hex2dec|0xFFFF}} → 0{{hex2dec|0x845FED}} → 0{{hex2dec|0x75BCD15}} → 0{{hex2dec|0xDEADBEEF}} → 0{{hex2dec|0xFFFFFFFF}} → 0
- Input formats
Input with or without 0x prefix:
{{hex2dec|0xa0}} → 0{{hex2dec|a0}} → 0
Uppercase and lowercase accepted:
{{hex2dec|A0}} → 0{{hex2dec|a0}} → 0
- Not a number input
{{hex2dec|}} → 0{{hex2dec}} → 0
{{hex2dec|0xAXYZ}} → 0{{hex2dec|XYZ}} → 0
{{hex2dec|0xA B}} → 0{{hex2dec|A B}} → 0
See also
- {{dec2hex}}
| The above documentation is transcluded from Template:Hex2dec/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |