Fix a typo in the `String.to_float` description

This commit is contained in:
Amir-Rasteg 2023-07-03 12:09:19 -04:00 committed by Rémi Verschelde
parent b7c2fd2e9a
commit 9744657bb8
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 5 additions and 5 deletions

View File

@ -920,11 +920,11 @@
<description> <description>
Converts the string representing a decimal number into a [float]. This method stops on the first non-number character, except the first decimal point ([code].[/code]) and the exponent letter ([code]e[/code]). See also [method is_valid_float]. Converts the string representing a decimal number into a [float]. This method stops on the first non-number character, except the first decimal point ([code].[/code]) and the exponent letter ([code]e[/code]). See also [method is_valid_float].
[codeblock] [codeblock]
var a = "12.35".to_float() # a is 12.35 var a = "12.35".to_float() # a is 12.35
var b = "1.2.3".to_float() # b is 1.2 var b = "1.2.3".to_float() # b is 1.2
var c = "12xy3".to_float() # c is 12.0 var c = "12xy3".to_float() # c is 12.0
var d = "1e3".to_float() # d is 1000.0 var d = "1e3".to_float() # d is 1000.0
var e = "Hello!".to_int() # e is 0.0 var e = "Hello!".to_float() # e is 0.0
[/codeblock] [/codeblock]
</description> </description>
</method> </method>