summaryrefslogtreecommitdiffstats
path: root/doc/classes/Dictionary.xml
diff options
context:
space:
mode:
authorDubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com>2024-10-16 19:18:17 -0500
committerDubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com>2024-10-17 11:16:37 -0500
commite7717ab517b9d4f828e5602f9b8488041ed05802 (patch)
tree7dfef15e377c976dea1899f5cab90b6265cba087 /doc/classes/Dictionary.xml
parent4d9e62ae8b601e89b5aeba13a2a3fe49d9eb4931 (diff)
downloadredot-engine-e7717ab517b9d4f828e5602f9b8488041ed05802.tar.gz
Rebranding: Doc/
Diffstat (limited to 'doc/classes/Dictionary.xml')
-rw-r--r--doc/classes/Dictionary.xml10
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml
index b8b4fc7b08..ad011ee9ba 100644
--- a/doc/classes/Dictionary.xml
+++ b/doc/classes/Dictionary.xml
@@ -210,29 +210,29 @@
[codeblocks]
[gdscript]
var my_dict = {
- "Godot" : 4,
+ "Redot" : 4,
210 : null,
}
- print(my_dict.has("Godot")) # Prints true
+ print(my_dict.has("Redot")) # Prints true
print(my_dict.has(210)) # Prints true
print(my_dict.has(4)) # Prints false
[/gdscript]
[csharp]
var myDict = new Godot.Collections.Dictionary
{
- { "Godot", 4 },
+ { "Redot", 4 },
{ 210, default },
};
- GD.Print(myDict.ContainsKey("Godot")); // Prints true
+ GD.Print(myDict.ContainsKey("Redot")); // Prints true
GD.Print(myDict.ContainsKey(210)); // Prints true
GD.Print(myDict.ContainsKey(4)); // Prints false
[/csharp]
[/codeblocks]
In GDScript, this is equivalent to the [code]in[/code] operator:
[codeblock]
- if "Godot" in {"Godot": 4}:
+ if "Redot" in {"Redot": 4}:
print("The key is here!") # Will be printed.
[/codeblock]
[b]Note:[/b] This method returns [code]true[/code] as long as the [param key] exists, even if its corresponding value is [code]null[/code].