diff options
author | Ryan Roden-Corrent <ryan@rcorre.net> | 2019-12-22 14:38:10 -0500 |
---|---|---|
committer | Ryan Roden-Corrent <ryan@rcorre.net> | 2019-12-22 14:38:10 -0500 |
commit | e0020447616d79ed674f3338339b7557abc41b02 (patch) | |
tree | 20b13647732ec29e9b1884d03d02a9514ef66a11 /doc | |
parent | 67f94ad76ef80040534ff43f79b7230b398f029e (diff) |
Be more specific about array return values.
The prior docs weren't clear if {pop_,}{front,back} would fail or return
`null` on an empty array.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/Array.xml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index e09c1f4b08..2d330fc935 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -93,7 +93,7 @@ <return type="Variant"> </return> <description> - Returns the last element of the array if the array is not empty. + Returns the last element of the array, or [code]null[/code] if the array is empty. </description> </method> <method name="bsearch"> @@ -186,7 +186,7 @@ <return type="Variant"> </return> <description> - Returns the first element of the array if the array is not empty. + Returns the first element of the array, or [code]null[/code] if the array is empty. </description> </method> <method name="has"> @@ -243,14 +243,14 @@ <return type="Variant"> </return> <description> - Removes the last element of the array. + Removes and returns the last element of the array. Returns [code]null[/code] if the array is empty. </description> </method> <method name="pop_front"> <return type="Variant"> </return> <description> - Removes the first element of the array. + Removes and returns the first element of the array. Returns [code]null[/code] if the array is empty. </description> </method> <method name="push_back"> |