mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-04-10 13:52:38 +02:00
Fix some of the missing docs for String.
This commit is contained in:
parent
8e5ffcc9f1
commit
bef218d7e4
@ -1118,6 +1118,13 @@
|
|||||||
<method name="to_double">
|
<method name="to_double">
|
||||||
<return type="float" />
|
<return type="float" />
|
||||||
<description>
|
<description>
|
||||||
|
Converts a string containing a decimal number into a [code]double[/code]. The method will stop on the first non-number character except the first [code].[/code] (decimal point), and [code]e[/code] which is used for exponential.
|
||||||
|
[codeblock]
|
||||||
|
print("12.3".to_double()) # 12.3
|
||||||
|
print("1.2.3".to_double()) # 1.2
|
||||||
|
print("12ab3".to_double()) # 12
|
||||||
|
print("1e3".to_double()) # 1000
|
||||||
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="to_float">
|
<method name="to_float">
|
||||||
@ -1149,6 +1156,18 @@
|
|||||||
Returns the string converted to lowercase.
|
Returns the string converted to lowercase.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
|
<method name="to_real">
|
||||||
|
<return type="float" />
|
||||||
|
<description>
|
||||||
|
Converts a string containing a decimal number into a [code]real[/code]. Reals can be either floats or doubles based on how the engine was compiled. By default they are floats. The method will stop on the first non-number character except the first [code].[/code] (decimal point), and [code]e[/code] which is used for exponential.
|
||||||
|
[codeblock]
|
||||||
|
print("12.3".to_real()) # 12.3
|
||||||
|
print("1.2.3".to_real()) # 1.2
|
||||||
|
print("12ab3".to_real()) # 12
|
||||||
|
print("1e3".to_real()) # 1000
|
||||||
|
[/codeblock]
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
<method name="to_uint">
|
<method name="to_uint">
|
||||||
<return type="int" />
|
<return type="int" />
|
||||||
<description>
|
<description>
|
||||||
|
Loading…
Reference in New Issue
Block a user