You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/classes/Array.xml
+15Lines changed: 15 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -812,6 +812,21 @@
812
812
[b]Note:[/b] You should not randomize the return value of [param func], as the heapsort algorithm expects a consistent result. Randomizing the return value will result in unexpected behavior.
813
813
</description>
814
814
</method>
815
+
<methodname="sorted"qualifiers="const">
816
+
<returntype="Array" />
817
+
<description>
818
+
Returns a sorted copy of this array. See also [method sort].
819
+
[b]Note:[/b] This method creates a copy, which may have a noticeable performance cost. To perform in-place sorting instead, use [method sort].
820
+
</description>
821
+
</method>
822
+
<methodname="sorted_custom"qualifiers="const">
823
+
<returntype="Array" />
824
+
<paramindex="0"name="func"type="Callable" />
825
+
<description>
826
+
Returns a copy of this array sorted using a custom [Callable]. See also [method sort_custom].
827
+
[b]Note:[/b] This method creates a copy, which may have a noticeable performance cost. To perform in-place sorting instead, use [method sort_custom].
Copy file name to clipboardExpand all lines: doc/classes/Dictionary.xml
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -531,6 +531,13 @@
531
531
This method ensures that the dictionary's entries are ordered consistently when [method keys] or [method values] are called, or when the dictionary needs to be converted to a string through [method @GlobalScope.str] or [method JSON.stringify].
532
532
</description>
533
533
</method>
534
+
<methodname="sorted"qualifiers="const">
535
+
<returntype="Dictionary" />
536
+
<description>
537
+
Returns a sorted copy of this dictionary. See also [method sort].
538
+
[b]Note:[/b] This method creates a copy, which may have a noticeable performance cost. To perform in-place sorting instead, use [method sort].
0 commit comments