Fix code example of String.is_valid_integer()

This commit is contained in:
Haoyu Qiu 2022-06-25 10:10:27 +08:00 committed by Relintai
parent 4bbbf1816f
commit ba696ecc9b

View File

@ -524,11 +524,11 @@
<description>
Returns [code]true[/code] if this string contains a valid integer.
[codeblock]
print("7".is_valid_int()) # Prints "True"
print("14.6".is_valid_int()) # Prints "False"
print("L".is_valid_int()) # Prints "False"
print("+3".is_valid_int()) # Prints "True"
print("-12".is_valid_int()) # Prints "True"
print("7".is_valid_integer()) # Prints "True"
print("14.6".is_valid_integer()) # Prints "False"
print("L".is_valid_integer()) # Prints "False"
print("+3".is_valid_integer()) # Prints "True"
print("-12".is_valid_integer()) # Prints "True"
[/codeblock]
</description>
</method>