Converts a number in string with hexadecimal base.
1 number.toHexString
<number.toHexString padd='padd'>
<number /> !
</number.toHexString>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Apadd | Integer | Indicate the amount of desired characters adding zeros to the left. |
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Enumber | short | integer | long |
Returns | |
---|---|
Type | Description |
String | Hexadecimal number in string format. If the value received is null, immediately it will return null as result. |
Exceptions
requires 1 arguments, received: 0
The function needs an entry value.
unsupported conversion to hexa from class [...]
Impossible conversion.
Example
Convert a number in string with hexadecimal base.
Copy
<xsql-script name='toHexString'> <body> <println> <number.toHexString>211234365</number.toHexString> </println> <!-- The shown value is C972E3D --> </body> </xsql-script>
Example
Convert a number in string with hexadecimal base and with zeros to the left.
Copy
<xsql-script name='toHexString'> <body> <println> <number.toHexString padd='15'>211234365</number.toHexString> </println> <!-- The shown value is 00000000C972E3D --> </body> </xsql-script>
In this case, it is interesting that the lenght of the numeric data would be of 15 characters. The result shows 8 zeros in front of the hexadecimal value.