diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-10-04 11:21:06 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-10-04 11:21:06 +0200 |
commit | e7d79f279d1d3dc4edec9aecb1c29dab6b419697 (patch) | |
tree | dc871cfb3cce5b839a85e166cc0d49c35b8c1f0d /doc/classes | |
parent | d6d8fb0f045efb670aaea8b209ddc7f994006714 (diff) | |
parent | a7f6ec0e4c6e502238f56d9088c1bf8a75010e6f (diff) | |
download | redot-engine-e7d79f279d1d3dc4edec9aecb1c29dab6b419697.tar.gz |
Merge pull request #77213 from aaronfranke/sort-dict
Add a sort method to Dictionary and HashMap
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/Dictionary.xml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index 4441c3cb79..5c9b22fe4a 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -474,6 +474,12 @@ Returns the number of entries in the dictionary. Empty dictionaries ([code]{ }[/code]) always return [code]0[/code]. See also [method is_empty]. </description> </method> + <method name="sort"> + <return type="void" /> + <description> + Sorts the dictionary in-place by key. This can be used to ensure dictionaries with the same contents produce equivalent results when getting the [method keys], getting the [method values], and converting to a string. This is also useful when wanting a JSON representation consistent with what is in memory, and useful for storing on a database that requires dictionaries to be sorted. + </description> + </method> <method name="values" qualifiers="const"> <return type="Array" /> <description> |