-
Notifications
You must be signed in to change notification settings - Fork 2
Map
A ds_map is a simple dictionary (also known as map, hashmap, associative array, etc) object.
Description: Gets the number of items added to the map.
Returns: number
Description: Gets an array of the keys added to the map.
Returns: array
Description: Initializes an empty map.
Returns: ds_map
Argument | Expected Type | Description |
---|---|---|
key | object | The key of the element to add. |
value | object | The value of the element to add. |
Description: Attempts to add the key and value to the map. If the key has already been added, returns false.
Returns: bool
Description: Clears all elements from the map.
Returns: null
Argument | Expected Type | Description |
---|---|---|
key | object | The key to search for. |
Description: Determines if the key has previously been added to the map.
Returns: bool
Description: Creates a shallow copy of the map.
Returns: ds_map
Argument | Expected Type | Description |
---|---|---|
key | object | The key of the element to get. |
Description: Attempts to get the value with the specified key. Returns null if the key wasn't found.
Returns: object
Argument | Expected Type | Description |
---|---|---|
key | object | The key of the element to remove. |
Description: Attempts to remove the element with the specified key. If the key couldn't be found, returns false.
Returns: bool
Argument | Expected Type | Description |
---|---|---|
key | object | The key of the element to set. |
value | object | The value of the element to set. |
Description: Sets the element with the specifed key within the map. Can overwrite previously added keys.
Returns: null