diff options
Diffstat (limited to 'doc/classes/Array.xml')
-rw-r--r-- | doc/classes/Array.xml | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 7767a1028d..02c6b18d55 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -302,7 +302,7 @@ </description> </method> <method name="insert"> - <return type="void" /> + <return type="int" /> <argument index="0" name="position" type="int" /> <argument index="1" name="value" type="Variant" /> <description> @@ -393,6 +393,14 @@ <description> </description> </method> + <method name="pop_at"> + <return type="Variant" /> + <argument index="0" name="position" type="int" /> + <description> + Removes and returns the element of the array at index [code]position[/code]. If negative, [code]position[/code] is considered relative to the end of the array. Leaves the array untouched and returns [code]null[/code] 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. + [b]Note:[/b] On large arrays, this method can be slower than [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 [method pop_at] will be. + </description> + </method> <method name="pop_back"> <return type="Variant" /> <description> @@ -487,7 +495,7 @@ <argument index="2" name="step" type="int" default="1" /> <argument index="3" name="deep" type="bool" default="false" /> <description> - Duplicates the subset described in the function and returns it in an array, deeply copying the array if [code]deep[/code] is [code]true[/code]. Lower and upper index are inclusive, with the [code]step[/code] describing the change between indices while slicing. + Duplicates the subset described in the function and returns it in an array, deeply copying the array if [code]deep[/code] is [code]true[/code]. Lower and upper index are inclusive, with the [code]step[/code] describing the change between indices while slicing. If [code]end[/code] is an invalid value, the end of the array is used. </description> </method> <method name="sort"> |