Template:DecHex
Jump to navigation
Jump to search
This documentation is transcluded from Template:DecHex/doc.
Convert an integer from decimal to hexadecimal (without padding).
Usage
{{DecHex |1= }}
- If the input is an empty string, the result is an empty string.
- Non-integer and negative values are truncated to unsigned 64-bit integers (with a maximum of 16 hexadecimal digits returned).
- The returned hexadecimal digits A to F are in upper case.
- You can use
{{padleft:{{DecHex|number}}|4|0}}
if needed to pad the number with leading 0 to get a minimal length of 4 digits (for example to display Unicode computed code points with 4 to 6 hexadecimal digits, after the conventional "U+" prefix).
Template parameters
Parameter | Description | Default | Status | |
---|---|---|---|---|
1 | a decimal integer | empty | optional |
Additional information
The template is intended to be used in the following namespaces: no namespace specified
The template is intended to be used by the following user groups: no user group specified
Relies on:
- Module:Xconv (fonction
d2h
)
See also
Localization
This template is not intended to be localized.