Update Array's remove_at()
description to cover removing the last element
This commit is contained in:
parent
764193629f
commit
bdffb74f06
1 changed files with 1 additions and 0 deletions
|
@ -536,6 +536,7 @@
|
|||
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.
|
||||
[b]Note:[/b] [param position] cannot be negative. To remove an element relative to the end of the array, use [code]arr.remove_at(arr.size() - (i + 1))[/code]. To remove the last element from the array without returning the value, use [code]arr.resize(arr.size() - 1)[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="resize">
|
||||
|
|
Loading…
Reference in a new issue