|
@@ -40,85 +40,85 @@ Arrays are always passed by reference.
|
|
|
Methods
|
|
|
-------
|
|
|
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PackedColorArray<class_PackedColorArray>` from **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PackedVector3Array<class_PackedVector3Array>` from **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` from **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PackedStringArray<class_PackedStringArray>` from **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PackedFloat64Array<class_PackedFloat64Array>` from **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` from **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PackedInt64Array<class_PackedInt64Array>` from **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PackedInt32Array<class_PackedInt32Array>` from **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PackedByteArray<class_PackedByteArray>` from **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`append<class_Array_method_append>` **(** :ref:`Variant<class_Variant>` value **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`back<class_Array_method_back>` **(** **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`int<class_int>` | :ref:`bsearch<class_Array_method_bsearch>` **(** :ref:`Variant<class_Variant>` value, :ref:`bool<class_bool>` before=true **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`int<class_int>` | :ref:`bsearch_custom<class_Array_method_bsearch_custom>` **(** :ref:`Variant<class_Variant>` value, :ref:`Object<class_Object>` obj, :ref:`String<class_String>` func, :ref:`bool<class_bool>` before=true **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`clear<class_Array_method_clear>` **(** **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`int<class_int>` | :ref:`count<class_Array_method_count>` **(** :ref:`Variant<class_Variant>` value **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Array<class_Array>` | :ref:`duplicate<class_Array_method_duplicate>` **(** :ref:`bool<class_bool>` deep=false **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`bool<class_bool>` | :ref:`empty<class_Array_method_empty>` **(** **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`erase<class_Array_method_erase>` **(** :ref:`Variant<class_Variant>` value **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`int<class_int>` | :ref:`find<class_Array_method_find>` **(** :ref:`Variant<class_Variant>` what, :ref:`int<class_int>` from=0 **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`int<class_int>` | :ref:`find_last<class_Array_method_find_last>` **(** :ref:`Variant<class_Variant>` value **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`front<class_Array_method_front>` **(** **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`bool<class_bool>` | :ref:`has<class_Array_method_has>` **(** :ref:`Variant<class_Variant>` value **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`int<class_int>` | :ref:`hash<class_Array_method_hash>` **(** **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`insert<class_Array_method_insert>` **(** :ref:`int<class_int>` position, :ref:`Variant<class_Variant>` value **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`invert<class_Array_method_invert>` **(** **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`max<class_Array_method_max>` **(** **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`min<class_Array_method_min>` **(** **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`pop_back<class_Array_method_pop_back>` **(** **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`pop_front<class_Array_method_pop_front>` **(** **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`push_back<class_Array_method_push_back>` **(** :ref:`Variant<class_Variant>` value **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`push_front<class_Array_method_push_front>` **(** :ref:`Variant<class_Variant>` value **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`remove<class_Array_method_remove>` **(** :ref:`int<class_int>` position **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`resize<class_Array_method_resize>` **(** :ref:`int<class_int>` size **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`int<class_int>` | :ref:`rfind<class_Array_method_rfind>` **(** :ref:`Variant<class_Variant>` what, :ref:`int<class_int>` from=-1 **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`shuffle<class_Array_method_shuffle>` **(** **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`int<class_int>` | :ref:`size<class_Array_method_size>` **(** **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| :ref:`Array<class_Array>` | :ref:`slice<class_Array_method_slice>` **(** :ref:`int<class_int>` begin, :ref:`int<class_int>` end, :ref:`int<class_int>` step=1, :ref:`bool<class_bool>` deep=false **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`sort<class_Array_method_sort>` **(** **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
-| void | :ref:`sort_custom<class_Array_method_sort_custom>` **(** :ref:`Object<class_Object>` obj, :ref:`String<class_String>` func **)** |
|
|
|
-+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PackedColorArray<class_PackedColorArray>` from **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PackedVector3Array<class_PackedVector3Array>` from **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` from **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PackedStringArray<class_PackedStringArray>` from **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PackedFloat64Array<class_PackedFloat64Array>` from **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` from **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PackedInt64Array<class_PackedInt64Array>` from **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PackedInt32Array<class_PackedInt32Array>` from **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PackedByteArray<class_PackedByteArray>` from **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`append<class_Array_method_append>` **(** :ref:`Variant<class_Variant>` value **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Variant<class_Variant>` | :ref:`back<class_Array_method_back>` **(** **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`int<class_int>` | :ref:`bsearch<class_Array_method_bsearch>` **(** :ref:`Variant<class_Variant>` value, :ref:`bool<class_bool>` before=true **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`int<class_int>` | :ref:`bsearch_custom<class_Array_method_bsearch_custom>` **(** :ref:`Variant<class_Variant>` value, :ref:`Object<class_Object>` obj, :ref:`String<class_String>` func, :ref:`bool<class_bool>` before=true **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`clear<class_Array_method_clear>` **(** **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`int<class_int>` | :ref:`count<class_Array_method_count>` **(** :ref:`Variant<class_Variant>` value **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Array<class_Array>` | :ref:`duplicate<class_Array_method_duplicate>` **(** :ref:`bool<class_bool>` deep=false **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`bool<class_bool>` | :ref:`empty<class_Array_method_empty>` **(** **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`erase<class_Array_method_erase>` **(** :ref:`Variant<class_Variant>` value **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`int<class_int>` | :ref:`find<class_Array_method_find>` **(** :ref:`Variant<class_Variant>` what, :ref:`int<class_int>` from=0 **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`int<class_int>` | :ref:`find_last<class_Array_method_find_last>` **(** :ref:`Variant<class_Variant>` value **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Variant<class_Variant>` | :ref:`front<class_Array_method_front>` **(** **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`bool<class_bool>` | :ref:`has<class_Array_method_has>` **(** :ref:`Variant<class_Variant>` value **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`int<class_int>` | :ref:`hash<class_Array_method_hash>` **(** **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`insert<class_Array_method_insert>` **(** :ref:`int<class_int>` position, :ref:`Variant<class_Variant>` value **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`invert<class_Array_method_invert>` **(** **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Variant<class_Variant>` | :ref:`max<class_Array_method_max>` **(** **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Variant<class_Variant>` | :ref:`min<class_Array_method_min>` **(** **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Variant<class_Variant>` | :ref:`pop_back<class_Array_method_pop_back>` **(** **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Variant<class_Variant>` | :ref:`pop_front<class_Array_method_pop_front>` **(** **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`push_back<class_Array_method_push_back>` **(** :ref:`Variant<class_Variant>` value **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`push_front<class_Array_method_push_front>` **(** :ref:`Variant<class_Variant>` value **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`remove<class_Array_method_remove>` **(** :ref:`int<class_int>` position **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`resize<class_Array_method_resize>` **(** :ref:`int<class_int>` size **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`int<class_int>` | :ref:`rfind<class_Array_method_rfind>` **(** :ref:`Variant<class_Variant>` what, :ref:`int<class_int>` from=-1 **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`shuffle<class_Array_method_shuffle>` **(** **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`int<class_int>` | :ref:`size<class_Array_method_size>` **(** **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| :ref:`Array<class_Array>` | :ref:`slice<class_Array_method_slice>` **(** :ref:`int<class_int>` begin, :ref:`int<class_int>` end, :ref:`int<class_int>` step=1, :ref:`bool<class_bool>` deep=false **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`sort<class_Array_method_sort>` **(** **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+| void | :ref:`sort_custom<class_Array_method_sort_custom>` **(** :ref:`Object<class_Object>` obj, :ref:`String<class_String>` func **)** |
|
|
|
++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
|
|
Method Descriptions
|
|
|
-------------------
|
|
@@ -189,7 +189,7 @@ Appends an element at the end of the array (alias of :ref:`push_back<class_Array
|
|
|
|
|
|
.. _class_Array_method_back:
|
|
|
|
|
|
-- void **back** **(** **)**
|
|
|
+- :ref:`Variant<class_Variant>` **back** **(** **)**
|
|
|
|
|
|
Returns the last element of the array, or ``null`` if the array is empty.
|
|
|
|
|
@@ -275,7 +275,7 @@ Searches the array in reverse order for a value and returns its index or -1 if n
|
|
|
|
|
|
.. _class_Array_method_front:
|
|
|
|
|
|
-- void **front** **(** **)**
|
|
|
+- :ref:`Variant<class_Variant>` **front** **(** **)**
|
|
|
|
|
|
Returns the first element of the array, or ``null`` if the array is empty.
|
|
|
|
|
@@ -322,7 +322,7 @@ Reverses the order of the elements in the array.
|
|
|
|
|
|
.. _class_Array_method_max:
|
|
|
|
|
|
-- void **max** **(** **)**
|
|
|
+- :ref:`Variant<class_Variant>` **max** **(** **)**
|
|
|
|
|
|
Returns the maximum value contained in the array if all elements are of comparable types. If the elements can't be compared, ``null`` is returned.
|
|
|
|
|
@@ -330,7 +330,7 @@ Returns the maximum value contained in the array if all elements are of comparab
|
|
|
|
|
|
.. _class_Array_method_min:
|
|
|
|
|
|
-- void **min** **(** **)**
|
|
|
+- :ref:`Variant<class_Variant>` **min** **(** **)**
|
|
|
|
|
|
Returns the minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, ``null`` is returned.
|
|
|
|
|
@@ -338,7 +338,7 @@ Returns the minimum value contained in the array if all elements are of comparab
|
|
|
|
|
|
.. _class_Array_method_pop_back:
|
|
|
|
|
|
-- void **pop_back** **(** **)**
|
|
|
+- :ref:`Variant<class_Variant>` **pop_back** **(** **)**
|
|
|
|
|
|
Removes and returns the last element of the array. Returns ``null`` if the array is empty.
|
|
|
|
|
@@ -346,7 +346,7 @@ Removes and returns the last element of the array. Returns ``null`` if the array
|
|
|
|
|
|
.. _class_Array_method_pop_front:
|
|
|
|
|
|
-- void **pop_front** **(** **)**
|
|
|
+- :ref:`Variant<class_Variant>` **pop_front** **(** **)**
|
|
|
|
|
|
Removes and returns the first element of the array. Returns ``null`` if the array is empty.
|
|
|
|