Clearify how hex_to_int expects a '0x' prefixed string. Provide a small hex_to_int example
This commit is contained in:
parent
06a4212377
commit
cebb38e0b3
3 changed files with 5 additions and 18 deletions
|
|
@ -385,7 +385,10 @@
|
|||
<return type="int">
|
||||
</return>
|
||||
<description>
|
||||
Converts a string containing a hexadecimal number into an integer.
|
||||
Converts a string containing a hexadecimal number into an integer. Hexadecimal strings are expected to be prefixed with "[code]0x[/code]" otherwise [code]0[/code] is returned.
|
||||
[codeblock]
|
||||
print("0xff".hex_to_int()) # Print "255"
|
||||
[/codeblock]
|
||||
</description>
|
||||
</method>
|
||||
<method name="http_escape">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue