mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 04:06:14 +00:00
Merge pull request #95780 from Mickeon/documentation-gdscript-some-invalid-code
Fix some invalid code in GDScript class reference
This commit is contained in:
commit
745cc6e438
@ -52,9 +52,9 @@
|
|||||||
<description>
|
<description>
|
||||||
Returns a single character (as a [String]) of the given Unicode code point (which is compatible with ASCII code).
|
Returns a single character (as a [String]) of the given Unicode code point (which is compatible with ASCII code).
|
||||||
[codeblock]
|
[codeblock]
|
||||||
a = char(65) # a is "A"
|
var upper = char(65) # upper is "A"
|
||||||
a = char(65 + 32) # a is "a"
|
var lower = char(65 + 32) # lower is "a"
|
||||||
a = char(8364) # a is "€"
|
var euro = char(8364) # euro is "€"
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
@ -150,10 +150,10 @@
|
|||||||
<description>
|
<description>
|
||||||
Returns the length of the given Variant [param var]. The length can be the character count of a [String] or [StringName], the element count of any array type, or the size of a [Dictionary]. For every other Variant type, a run-time error is generated and execution is stopped.
|
Returns the length of the given Variant [param var]. The length can be the character count of a [String] or [StringName], the element count of any array type, or the size of a [Dictionary]. For every other Variant type, a run-time error is generated and execution is stopped.
|
||||||
[codeblock]
|
[codeblock]
|
||||||
a = [1, 2, 3, 4]
|
var a = [1, 2, 3, 4]
|
||||||
len(a) # Returns 4
|
len(a) # Returns 4
|
||||||
|
|
||||||
b = "Hello!"
|
var b = "Hello!"
|
||||||
len(b) # Returns 6
|
len(b) # Returns 6
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
|
Loading…
Reference in New Issue
Block a user