summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorBalloonpopper <balloonpopper@git.com>2021-08-25 16:37:40 +1000
committerBalloonpopper <balloonpopper@git.com>2021-08-26 17:11:34 +1000
commit4fae7ae9dc8e115c13c70c2762715cf3e4623a06 (patch)
tree75c0b08e1537c4149e8bc07735d7d2b54ae830af /doc/classes
parentbb0122c9331e7cb56d358ab427329a267b387969 (diff)
Correct null and boolean values being capitalised by the str command
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/Object.xml8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index 9ad79dc17a..c9e9a0699c 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -13,15 +13,15 @@
[codeblocks]
[gdscript]
var n = Node2D.new()
- print("position" in n) # Prints "True".
- print("other_property" in n) # Prints "False".
+ print("position" in n) # Prints "true".
+ print("other_property" in n) # Prints "false".
[/gdscript]
[csharp]
var node = new Node2D();
// C# has no direct equivalent to GDScript's `in` operator here, but we
// can achieve the same behavior by performing `Get` with a null check.
- GD.Print(node.Get("position") != null); // Prints "True".
- GD.Print(node.Get("other_property") != null); // Prints "False".
+ GD.Print(node.Get("position") != null); // Prints "true".
+ GD.Print(node.Get("other_property") != null); // Prints "false".
[/csharp]
[/codeblocks]
The [code]in[/code] operator will evaluate to [code]true[/code] as long as the key exists, even if the value is [code]null[/code].