Clearify how hex_to_int expects a '0x' prefixed string. Provide a small hex_to_int example

This commit is contained in:
lmp
2019-07-07 18:53:54 +02:00
parent 06a4212377
commit cebb38e0b3
3 changed files with 5 additions and 18 deletions
+4 -1
View File
@@ -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">