Dictionary
Dictionary type.
Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are always passed by reference.
Erasing elements while iterating over them is not supported.
Creating a dictionary:
d["Godot"] = 3.01 # Add String "Godot" as a key and assign the value 3.01 to it.
- void clear ( )
Clear the dictionary, removing all key/value pairs.
- duplicate ( bool deep=False )
Creates a copy of the dictionary, and returns it.
- empty ( )
Returns true
if the dictionary is empty.
Erase a dictionary key/value pair by key. Returns if the given key was present in the dictionary, false
otherwise. Do not erase elements while iterating over the dictionary.
- has ( Variant key )
Returns if the dictionary has a given key.
- has_all ( Array keys )
Returns true
if the dictionary has all of the keys in the given array.
- hash ( )
Returns a hashed integer value representing the dictionary contents.
- Array keys ( )
Returns the list of keys in the Dictionary
.
- values ( )
Returns the list of values in the .