Merge pull request #62392 from timothyqiu/valid-integer

[3.x] Fix code example of `String.is_valid_integer()`
This commit is contained in:
Rémi Verschelde 2022-06-25 10:01:45 +02:00 committed by GitHub
commit b9057a71ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -488,11 +488,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>