mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 19:29:06 +00:00
classref: Sync with current upstream master branch
This commit is contained in:
@@ -159,6 +159,8 @@ Return the amount of times an element is in the array.
|
||||
|
||||
- :ref:`Array<class_array>` **duplicate** **(** **)**
|
||||
|
||||
Returns a copy of this ``Array``.
|
||||
|
||||
.. _class_Array_empty:
|
||||
|
||||
- :ref:`bool<class_bool>` **empty** **(** **)**
|
||||
@@ -218,7 +220,7 @@ Insert a new element at a given position in the array. The position must be vali
|
||||
|
||||
- void **invert** **(** **)**
|
||||
|
||||
Reverse the order of the elements in the array (so first element will now be the last).
|
||||
Reverse the order of the elements in the array (so first element will now be the last) and return reference to the array.
|
||||
|
||||
.. _class_Array_pop_back:
|
||||
|
||||
@@ -272,12 +274,12 @@ Return the amount of elements in the array.
|
||||
|
||||
- void **sort** **(** **)**
|
||||
|
||||
Sort the array using natural order.
|
||||
Sort the array using natural order and return reference to the array.
|
||||
|
||||
.. _class_Array_sort_custom:
|
||||
|
||||
- void **sort_custom** **(** :ref:`Object<class_object>` obj, :ref:`String<class_string>` func **)**
|
||||
|
||||
Sort the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise. Note: you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
|
||||
Sort the array using a custom method and return reference to the array. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise. Note: you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user