diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index db5d377c6284..909380b3b2df 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -234,7 +234,9 @@ - Removes the first occurrence of a value from the array. + Removes the first occurrence of a value from the array. To remove an element by index, use [method remove] instead. + [b]Note:[/b] This method acts in-place and doesn't return a value. + [b]Note:[/b] 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. @@ -323,6 +325,8 @@ Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]pos == size()[/code]). + [b]Note:[/b] This method acts in-place and doesn't return a value. + [b]Note:[/b] 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. @@ -421,14 +425,15 @@ - Removes and returns the last element of the array. Returns [code]null[/code] if the array is empty, without printing an error message. + Removes and returns the last element of the array. Returns [code]null[/code] if the array is empty, without printing an error message. See also [method pop_front]. - Removes and returns the first element of the array. Returns [code]null[/code] if the array is empty, without printing an error message. + Removes and returns the first element of the array. Returns [code]null[/code] if the array is empty, without printing an error message. See also [method pop_back]. + [b]Note:[/b] On large arrays, this method is much slower than [method pop_back] as it will reindex all the array's elements every time it's called. The larger the array, the slower [method pop_front] will be. @@ -437,7 +442,7 @@ - Appends an element at the end of the array. + Appends an element at the end of the array. See also [method push_front]. @@ -446,7 +451,8 @@ - Adds an element at the beginning of the array. + Adds an element at the beginning of the array. See also [method push_back]. + [b]Note:[/b] On large arrays, this method is much slower than [method push_back] as it will reindex all the array's elements every time it's called. The larger the array, the slower [method push_front] will be. @@ -455,7 +461,9 @@ - Removes an element from the array by index. If the index does not exist in the array, nothing happens. + 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 [method erase] instead. + [b]Note:[/b] This method acts in-place and doesn't return a value. + [b]Note:[/b] 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.