Clearify how hex_to_int expects a '0x' prefixed string. Provide a small hex_to_int example
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user