User Tools

Site Tools


array

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
array [2022/12/27 18:15] justinarray [2024/02/17 10:27] (current) justin
Line 54: Line 54:
 |insert(index, value)|Inserts a value into an array at the specified index (starting at 0).| |insert(index, value)|Inserts a value into an array at the specified index (starting at 0).|
 |remove(index)|Removes a value from an array at the specified index (starting at 0).| |remove(index)|Removes a value from an array at the specified index (starting at 0).|
 +|erase(value)|Removes the first occurrence of the specified value from an array.|
 |clear()|Removes all values from an array.| |clear()|Removes all values from an array.|
 |size()|Returns the number of items in an array.| |size()|Returns the number of items in an array.|
Line 75: Line 76:
 <code bauxite> <code bauxite>
 $my_array.remove(2); $my_array.remove(2);
 +</code>
 +<code bauxite>
 +$my_array.erase($my_value);
 </code> </code>
 <code bauxite> <code bauxite>
array.1672193702.txt.gz · Last modified: 2022/12/27 18:15 by justin