mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
classref: Sync with current 3.5 branch (fc32e06)
This commit is contained in:
@@ -12,6 +12,8 @@ Array
|
||||
|
||||
A generic array datatype.
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
@@ -42,149 +44,194 @@ Arrays can be concatenated using the ``+`` operator:
|
||||
|
||||
\ **Note:** When declaring an array with ``const``, the array itself can still be mutated by defining the values at individual indices or pushing/removing elements. Using ``const`` will only prevent assigning the constant with another value after it was initialized.
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PoolColorArray<class_PoolColorArray>` from **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PoolVector3Array<class_PoolVector3Array>` from **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PoolVector2Array<class_PoolVector2Array>` from **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PoolStringArray<class_PoolStringArray>` from **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PoolRealArray<class_PoolRealArray>` from **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PoolIntArray<class_PoolIntArray>` from **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PoolByteArray<class_PoolByteArray>` from **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`append<class_Array_method_append>` **(** :ref:`Variant<class_Variant>` value **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`append_array<class_Array_method_append_array>` **(** :ref:`Array<class_Array>` array **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :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 **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`fill<class_Array_method_fill>` **(** :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_at<class_Array_method_pop_at>` **(** :ref:`int<class_int>` position **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :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 **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PoolColorArray<class_PoolColorArray>` from **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PoolVector3Array<class_PoolVector3Array>` from **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PoolVector2Array<class_PoolVector2Array>` from **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PoolStringArray<class_PoolStringArray>` from **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PoolRealArray<class_PoolRealArray>` from **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PoolIntArray<class_PoolIntArray>` from **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_Array>` | :ref:`Array<class_Array_method_Array>` **(** :ref:`PoolByteArray<class_PoolByteArray>` from **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`append<class_Array_method_append>` **(** :ref:`Variant<class_Variant>` value **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`append_array<class_Array_method_append_array>` **(** :ref:`Array<class_Array>` array **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :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 **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`fill<class_Array_method_fill>` **(** :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_at<class_Array_method_pop_at>` **(** :ref:`int<class_int>` position **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :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 **)** |
|
||||
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
----
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
|
||||
.. _class_Array_method_Array:
|
||||
|
||||
- :ref:`Array<class_Array>` **Array** **(** :ref:`PoolColorArray<class_PoolColorArray>` from **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Array<class_Array>` **Array** **(** :ref:`PoolColorArray<class_PoolColorArray>` from **)**
|
||||
|
||||
Constructs an array from a :ref:`PoolColorArray<class_PoolColorArray>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
- :ref:`Array<class_Array>` **Array** **(** :ref:`PoolVector3Array<class_PoolVector3Array>` from **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Array<class_Array>` **Array** **(** :ref:`PoolVector3Array<class_PoolVector3Array>` from **)**
|
||||
|
||||
Constructs an array from a :ref:`PoolVector3Array<class_PoolVector3Array>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
- :ref:`Array<class_Array>` **Array** **(** :ref:`PoolVector2Array<class_PoolVector2Array>` from **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Array<class_Array>` **Array** **(** :ref:`PoolVector2Array<class_PoolVector2Array>` from **)**
|
||||
|
||||
Constructs an array from a :ref:`PoolVector2Array<class_PoolVector2Array>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
- :ref:`Array<class_Array>` **Array** **(** :ref:`PoolStringArray<class_PoolStringArray>` from **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Array<class_Array>` **Array** **(** :ref:`PoolStringArray<class_PoolStringArray>` from **)**
|
||||
|
||||
Constructs an array from a :ref:`PoolStringArray<class_PoolStringArray>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
- :ref:`Array<class_Array>` **Array** **(** :ref:`PoolRealArray<class_PoolRealArray>` from **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Array<class_Array>` **Array** **(** :ref:`PoolRealArray<class_PoolRealArray>` from **)**
|
||||
|
||||
Constructs an array from a :ref:`PoolRealArray<class_PoolRealArray>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
- :ref:`Array<class_Array>` **Array** **(** :ref:`PoolIntArray<class_PoolIntArray>` from **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Array<class_Array>` **Array** **(** :ref:`PoolIntArray<class_PoolIntArray>` from **)**
|
||||
|
||||
Constructs an array from a :ref:`PoolIntArray<class_PoolIntArray>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
- :ref:`Array<class_Array>` **Array** **(** :ref:`PoolByteArray<class_PoolByteArray>` from **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Array<class_Array>` **Array** **(** :ref:`PoolByteArray<class_PoolByteArray>` from **)**
|
||||
|
||||
Constructs an array from a :ref:`PoolByteArray<class_PoolByteArray>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_append:
|
||||
|
||||
- void **append** **(** :ref:`Variant<class_Variant>` value **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **append** **(** :ref:`Variant<class_Variant>` value **)**
|
||||
|
||||
Appends an element at the end of the array (alias of :ref:`push_back<class_Array_method_push_back>`).
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_append_array:
|
||||
|
||||
- void **append_array** **(** :ref:`Array<class_Array>` array **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **append_array** **(** :ref:`Array<class_Array>` array **)**
|
||||
|
||||
Appends another array at the end of this array.
|
||||
|
||||
@@ -195,31 +242,43 @@ Appends another array at the end of this array.
|
||||
array1.append_array(array2)
|
||||
print(array1) # Prints [1, 2, 3, 4, 5, 6].
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_back:
|
||||
|
||||
- :ref:`Variant<class_Variant>` **back** **(** **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Variant<class_Variant>` **back** **(** **)**
|
||||
|
||||
Returns the last element of the array. Prints an error and returns ``null`` if the array is empty.
|
||||
|
||||
\ **Note:** Calling this function is not the same as writing ``array[-1]``. If the array is empty, accessing by index will pause project execution when running from the editor.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_bsearch:
|
||||
|
||||
- :ref:`int<class_int>` **bsearch** **(** :ref:`Variant<class_Variant>` value, :ref:`bool<class_bool>` before=true **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **bsearch** **(** :ref:`Variant<class_Variant>` value, :ref:`bool<class_bool>` before=true **)**
|
||||
|
||||
Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a ``before`` specifier can be passed. If ``false``, the returned index comes after all existing entries of the value in the array.
|
||||
|
||||
\ **Note:** Calling :ref:`bsearch<class_Array_method_bsearch>` on an unsorted array results in unexpected behavior.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_bsearch_custom:
|
||||
|
||||
- :ref:`int<class_int>` **bsearch_custom** **(** :ref:`Variant<class_Variant>` value, :ref:`Object<class_Object>` obj, :ref:`String<class_String>` func, :ref:`bool<class_bool>` before=true **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **bsearch_custom** **(** :ref:`Variant<class_Variant>` value, :ref:`Object<class_Object>` obj, :ref:`String<class_String>` func, :ref:`bool<class_bool>` before=true **)**
|
||||
|
||||
Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method declared in the ``obj``. Optionally, a ``before`` specifier can be passed. If ``false``, the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return ``true`` if the first argument is less than the second, and return ``false`` otherwise.
|
||||
|
||||
@@ -248,45 +307,65 @@ Finds the index of an existing value (or the insertion index that maintains sort
|
||||
|
||||
\ **Note:** Calling :ref:`bsearch_custom<class_Array_method_bsearch_custom>` on an unsorted array results in unexpected behavior.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_clear:
|
||||
|
||||
- void **clear** **(** **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **clear** **(** **)**
|
||||
|
||||
Clears the array. This is equivalent to using :ref:`resize<class_Array_method_resize>` with a size of ``0``.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_count:
|
||||
|
||||
- :ref:`int<class_int>` **count** **(** :ref:`Variant<class_Variant>` value **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **count** **(** :ref:`Variant<class_Variant>` value **)**
|
||||
|
||||
Returns the number of times an element is in the array.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_duplicate:
|
||||
|
||||
- :ref:`Array<class_Array>` **duplicate** **(** :ref:`bool<class_bool>` deep=false **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Array<class_Array>` **duplicate** **(** :ref:`bool<class_bool>` deep=false **)**
|
||||
|
||||
Returns a copy of the array.
|
||||
|
||||
If ``deep`` is ``true``, a deep copy is performed: all nested arrays and dictionaries are duplicated and will not be shared with the original array. If ``false``, a shallow copy is made and references to the original nested arrays and dictionaries are kept, so that modifying a sub-array or dictionary in the copy will also impact those referenced in the source array.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_empty:
|
||||
|
||||
- :ref:`bool<class_bool>` **empty** **(** **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **empty** **(** **)**
|
||||
|
||||
Returns ``true`` if the array is empty.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_erase:
|
||||
|
||||
- void **erase** **(** :ref:`Variant<class_Variant>` value **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **erase** **(** :ref:`Variant<class_Variant>` value **)**
|
||||
|
||||
Removes the first occurrence of a value from the array. If the value does not exist in the array, nothing happens. To remove an element by index, use :ref:`remove<class_Array_method_remove>` instead.
|
||||
|
||||
@@ -294,11 +373,15 @@ Removes the first occurrence of a value from the array. If the value does not ex
|
||||
|
||||
\ **Note:** On large arrays, this method will be slower if the removed element is close to the beginning of the array (index 0). This is because all elements placed after the removed element have to be reindexed.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_fill:
|
||||
|
||||
- void **fill** **(** :ref:`Variant<class_Variant>` value **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **fill** **(** :ref:`Variant<class_Variant>` value **)**
|
||||
|
||||
Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize<class_Array_method_resize>` to create an array with a given size and initialized elements:
|
||||
|
||||
@@ -308,39 +391,55 @@ Assigns the given value to all elements in the array. This can typically be used
|
||||
array.resize(10)
|
||||
array.fill(0) # Initialize the 10 elements to 0.
|
||||
|
||||
\ **Note:** If ``value`` is of a reference type (:ref:`Object<class_Object>`-derived, ``Array``, :ref:`Dictionary<class_Dictionary>`, etc.) then the array is filled with the references to the same object, i.e. no duplicates are created.
|
||||
\ **Note:** If ``value`` is of a reference type (:ref:`Object<class_Object>`-derived, **Array**, :ref:`Dictionary<class_Dictionary>`, etc.) then the array is filled with the references to the same object, i.e. no duplicates are created.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_find:
|
||||
|
||||
- :ref:`int<class_int>` **find** **(** :ref:`Variant<class_Variant>` what, :ref:`int<class_int>` from=0 **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **find** **(** :ref:`Variant<class_Variant>` what, :ref:`int<class_int>` from=0 **)**
|
||||
|
||||
Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. Returns ``-1`` if ``from`` is out of bounds.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_find_last:
|
||||
|
||||
- :ref:`int<class_int>` **find_last** **(** :ref:`Variant<class_Variant>` value **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **find_last** **(** :ref:`Variant<class_Variant>` value **)**
|
||||
|
||||
Searches the array in reverse order for a value and returns its index or ``-1`` if not found.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_front:
|
||||
|
||||
- :ref:`Variant<class_Variant>` **front** **(** **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Variant<class_Variant>` **front** **(** **)**
|
||||
|
||||
Returns the first element of the array. Prints an error and returns ``null`` if the array is empty.
|
||||
|
||||
\ **Note:** Calling this function is not the same as writing ``array[0]``. If the array is empty, accessing by index will pause project execution when running from the editor.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_has:
|
||||
|
||||
- :ref:`bool<class_bool>` **has** **(** :ref:`Variant<class_Variant>` value **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **has** **(** :ref:`Variant<class_Variant>` value **)**
|
||||
|
||||
Returns ``true`` if the array contains the given value.
|
||||
|
||||
@@ -359,21 +458,29 @@ Returns ``true`` if the array contains the given value.
|
||||
if 2 in [2, 4, 6, 8]:
|
||||
pass
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_hash:
|
||||
|
||||
- :ref:`int<class_int>` **hash** **(** **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **hash** **(** **)**
|
||||
|
||||
Returns a hashed 32-bit integer value representing the array and its contents.
|
||||
|
||||
\ **Note:** ``Array``\ s with equal content will always produce identical hash values. However, the reverse is not true. Returning identical hash values does *not* imply the arrays are equal, because different arrays can have identical hash values due to hash collisions.
|
||||
\ **Note:** **Array**\ s with equal content will always produce identical hash values. However, the reverse is not true. Returning identical hash values does *not* imply the arrays are equal, because different arrays can have identical hash values due to hash collisions.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_insert:
|
||||
|
||||
- void **insert** **(** :ref:`int<class_int>` position, :ref:`Variant<class_Variant>` value **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **insert** **(** :ref:`int<class_int>` position, :ref:`Variant<class_Variant>` value **)**
|
||||
|
||||
Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (``pos == size()``).
|
||||
|
||||
@@ -381,81 +488,117 @@ Inserts a new element at a given position in the array. The position must be val
|
||||
|
||||
\ **Note:** On large arrays, this method will be slower if the inserted element is close to the beginning of the array (index 0). This is because all elements placed after the newly inserted element have to be reindexed.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_invert:
|
||||
|
||||
- void **invert** **(** **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **invert** **(** **)**
|
||||
|
||||
Reverses the order of the elements in the array.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_max:
|
||||
|
||||
- :ref:`Variant<class_Variant>` **max** **(** **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
: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.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_min:
|
||||
|
||||
- :ref:`Variant<class_Variant>` **min** **(** **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
: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.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_pop_at:
|
||||
|
||||
- :ref:`Variant<class_Variant>` **pop_at** **(** :ref:`int<class_int>` position **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Variant<class_Variant>` **pop_at** **(** :ref:`int<class_int>` position **)**
|
||||
|
||||
Removes and returns the element of the array at index ``position``. If negative, ``position`` is considered relative to the end of the array. Leaves the array untouched and returns ``null`` if the array is empty or if it's accessed out of bounds. An error message is printed when the array is accessed out of bounds, but not when the array is empty.
|
||||
|
||||
\ **Note:** On large arrays, this method can be slower than :ref:`pop_back<class_Array_method_pop_back>` as it will reindex the array's elements that are located after the removed element. The larger the array and the lower the index of the removed element, the slower :ref:`pop_at<class_Array_method_pop_at>` will be.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_pop_back:
|
||||
|
||||
- :ref:`Variant<class_Variant>` **pop_back** **(** **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Variant<class_Variant>` **pop_back** **(** **)**
|
||||
|
||||
Removes and returns the last element of the array. Returns ``null`` if the array is empty, without printing an error message. See also :ref:`pop_front<class_Array_method_pop_front>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_pop_front:
|
||||
|
||||
- :ref:`Variant<class_Variant>` **pop_front** **(** **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Variant<class_Variant>` **pop_front** **(** **)**
|
||||
|
||||
Removes and returns the first element of the array. Returns ``null`` if the array is empty, without printing an error message. See also :ref:`pop_back<class_Array_method_pop_back>`.
|
||||
|
||||
\ **Note:** On large arrays, this method is much slower than :ref:`pop_back<class_Array_method_pop_back>` as it will reindex all the array's elements every time it's called. The larger the array, the slower :ref:`pop_front<class_Array_method_pop_front>` will be.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_push_back:
|
||||
|
||||
- void **push_back** **(** :ref:`Variant<class_Variant>` value **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **push_back** **(** :ref:`Variant<class_Variant>` value **)**
|
||||
|
||||
Appends an element at the end of the array. See also :ref:`push_front<class_Array_method_push_front>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_push_front:
|
||||
|
||||
- void **push_front** **(** :ref:`Variant<class_Variant>` value **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **push_front** **(** :ref:`Variant<class_Variant>` value **)**
|
||||
|
||||
Adds an element at the beginning of the array. See also :ref:`push_back<class_Array_method_push_back>`.
|
||||
|
||||
\ **Note:** On large arrays, this method is much slower than :ref:`push_back<class_Array_method_push_back>` as it will reindex all the array's elements every time it's called. The larger the array, the slower :ref:`push_front<class_Array_method_push_front>` will be.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_remove:
|
||||
|
||||
- void **remove** **(** :ref:`int<class_int>` position **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **remove** **(** :ref:`int<class_int>` position **)**
|
||||
|
||||
Removes an element from the array by index. If the index does not exist in the array, nothing happens. To remove an element by searching for its value, use :ref:`erase<class_Array_method_erase>` instead.
|
||||
|
||||
@@ -463,51 +606,75 @@ Removes an element from the array by index. If the index does not exist in the a
|
||||
|
||||
\ **Note:** On large arrays, this method will be slower if the removed element is close to the beginning of the array (index 0). This is because all elements placed after the removed element have to be reindexed.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_resize:
|
||||
|
||||
- void **resize** **(** :ref:`int<class_int>` size **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **resize** **(** :ref:`int<class_int>` size **)**
|
||||
|
||||
Resizes the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are ``null``.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_rfind:
|
||||
|
||||
- :ref:`int<class_int>` **rfind** **(** :ref:`Variant<class_Variant>` what, :ref:`int<class_int>` from=-1 **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **rfind** **(** :ref:`Variant<class_Variant>` what, :ref:`int<class_int>` from=-1 **)**
|
||||
|
||||
Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. If the adjusted start index is out of bounds, this method searches from the end of the array.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_shuffle:
|
||||
|
||||
- void **shuffle** **(** **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **shuffle** **(** **)**
|
||||
|
||||
Shuffles the array such that the items will have a random order. This method uses the global random number generator common to methods such as :ref:`@GDScript.randi<class_@GDScript_method_randi>`. Call :ref:`@GDScript.randomize<class_@GDScript_method_randomize>` to ensure that a new seed will be used each time if you want non-reproducible shuffling.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_size:
|
||||
|
||||
- :ref:`int<class_int>` **size** **(** **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **size** **(** **)**
|
||||
|
||||
Returns the number of elements in the array.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_slice:
|
||||
|
||||
- :ref:`Array<class_Array>` **slice** **(** :ref:`int<class_int>` begin, :ref:`int<class_int>` end, :ref:`int<class_int>` step=1, :ref:`bool<class_bool>` deep=false **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Array<class_Array>` **slice** **(** :ref:`int<class_int>` begin, :ref:`int<class_int>` end, :ref:`int<class_int>` step=1, :ref:`bool<class_bool>` deep=false **)**
|
||||
|
||||
Duplicates the subset described in the function and returns it in an array, deeply copying the array if ``deep`` is ``true``. Lower and upper index are inclusive, with the ``step`` describing the change between indices while slicing.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_sort:
|
||||
|
||||
- void **sort** **(** **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **sort** **(** **)**
|
||||
|
||||
Sorts the array.
|
||||
|
||||
@@ -521,11 +688,15 @@ Sorts the array.
|
||||
strings.sort()
|
||||
print(strings) # Prints [string1, string10, string11, string2]
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Array_method_sort_custom:
|
||||
|
||||
- void **sort_custom** **(** :ref:`Object<class_Object>` obj, :ref:`String<class_String>` func **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **sort_custom** **(** :ref:`Object<class_Object>` obj, :ref:`String<class_String>` func **)**
|
||||
|
||||
Sorts 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 either ``true`` or ``false``.
|
||||
|
||||
@@ -550,3 +721,4 @@ For two elements ``a`` and ``b``, if the given method returns ``true``, element
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
|
||||
Reference in New Issue
Block a user