mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 19:29:06 +00:00
classref: Sync with latest 4.0-alpha
This commit is contained in:
@@ -54,7 +54,7 @@ Methods
|
||||
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`push_back<class_PackedStringArray_method_push_back>` **(** :ref:`String<class_String>` value **)** |
|
||||
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`remove<class_PackedStringArray_method_remove>` **(** :ref:`int<class_int>` index **)** |
|
||||
| void | :ref:`remove_at<class_PackedStringArray_method_remove_at>` **(** :ref:`int<class_int>` index **)** |
|
||||
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`resize<class_PackedStringArray_method_resize>` **(** :ref:`int<class_int>` new_size **)** |
|
||||
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
@@ -64,9 +64,9 @@ Methods
|
||||
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`size<class_PackedStringArray_method_size>` **(** **)** |const| |
|
||||
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`sort<class_PackedStringArray_method_sort>` **(** **)** |
|
||||
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`slice<class_PackedStringArray_method_slice>` **(** :ref:`int<class_int>` begin, :ref:`int<class_int>` end=2147483647 **)** |const| |
|
||||
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`subarray<class_PackedStringArray_method_subarray>` **(** :ref:`int<class_int>` from, :ref:`int<class_int>` to **)** |const| |
|
||||
| void | :ref:`sort<class_PackedStringArray_method_sort>` **(** **)** |
|
||||
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_byte_array<class_PackedStringArray_method_to_byte_array>` **(** **)** |const| |
|
||||
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
@@ -134,7 +134,7 @@ Appends a ``PackedStringArray`` at the end of this array.
|
||||
|
||||
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_PackedStringArray_method_bsearch>` on an unsorted array results in unexpected behavior.
|
||||
\ **Note:** Calling :ref:`bsearch<class_PackedStringArray_method_bsearch>` on an unsorted array results in unexpected behavior.
|
||||
|
||||
----
|
||||
|
||||
@@ -186,9 +186,9 @@ Appends a string element at end of the array.
|
||||
|
||||
----
|
||||
|
||||
.. _class_PackedStringArray_method_remove:
|
||||
.. _class_PackedStringArray_method_remove_at:
|
||||
|
||||
- void **remove** **(** :ref:`int<class_int>` index **)**
|
||||
- void **remove_at** **(** :ref:`int<class_int>` index **)**
|
||||
|
||||
Removes an element from the array by index.
|
||||
|
||||
@@ -222,7 +222,19 @@ Changes the :ref:`String<class_String>` at the given index.
|
||||
|
||||
- :ref:`int<class_int>` **size** **(** **)** |const|
|
||||
|
||||
Returns the size of the array.
|
||||
Returns the number of elements in the array.
|
||||
|
||||
----
|
||||
|
||||
.. _class_PackedStringArray_method_slice:
|
||||
|
||||
- :ref:`PackedStringArray<class_PackedStringArray>` **slice** **(** :ref:`int<class_int>` begin, :ref:`int<class_int>` end=2147483647 **)** |const|
|
||||
|
||||
Returns the slice of the ``PackedStringArray``, from ``begin`` (inclusive) to ``end`` (exclusive), as a new ``PackedStringArray``.
|
||||
|
||||
The absolute value of ``begin`` and ``end`` will be clamped to the array size, so the default value for ``end`` makes it slice to the size of the array by default (i.e. ``arr.slice(1)`` is a shorthand for ``arr.slice(1, arr.size())``).
|
||||
|
||||
If either ``begin`` or ``end`` are negative, they will be relative to the end of the array (i.e. ``arr.slice(0, -2)`` is a shorthand for ``arr.slice(0, arr.size() - 2)``).
|
||||
|
||||
----
|
||||
|
||||
@@ -234,12 +246,6 @@ Sorts the elements of the array in ascending order.
|
||||
|
||||
----
|
||||
|
||||
.. _class_PackedStringArray_method_subarray:
|
||||
|
||||
- :ref:`PackedStringArray<class_PackedStringArray>` **subarray** **(** :ref:`int<class_int>` from, :ref:`int<class_int>` to **)** |const|
|
||||
|
||||
----
|
||||
|
||||
.. _class_PackedStringArray_method_to_byte_array:
|
||||
|
||||
- :ref:`PackedByteArray<class_PackedByteArray>` **to_byte_array** **(** **)** |const|
|
||||
|
||||
Reference in New Issue
Block a user