deleteRange: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\{\{GameCategory\|(arma[0123])\|New[ _]Scripting[ _]Commands[ _]List\}\}" to "{{GameCategory|$1|New Scripting Commands}}") |
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
||
Line 1: | Line 1: | ||
{{Command|Comments= | {{Command|Comments= | ||
| arma3 |Game name= | | arma3 |Game name= | ||
Line 8: | Line 7: | ||
|gr1= Arrays |GROUP1= | |gr1= Arrays |GROUP1= | ||
| Removes a range of array elements from the given array (modifies the original array, just like [[resize]] or [[set]]). |DESCRIPTION= | | Removes a range of array elements from the given array (modifies the original array, just like [[resize]] or [[set]]). |DESCRIPTION= | ||
| array '''deleteRange''' [from, count] |SYNTAX= | | array '''deleteRange''' [from, count] |SYNTAX= | ||
Line 21: | Line 18: | ||
| [[Nothing]] |RETURNVALUE= | | [[Nothing]] |RETURNVALUE= | ||
|x1= <code>_arr = [1,2,3,4,5,6]; | |x1= <code>_arr = [1,2,3,4,5,6]; | ||
Line 27: | Line 23: | ||
[[hint]] [[str]] _arr; //[1,6]</code> |EXAMPLE1= | [[hint]] [[str]] _arr; //[1,6]</code> |EXAMPLE1= | ||
| [[deleteAt]], [[set]], [[resize]], [[select]], [[in]], [[find]], [[toArray]], [[toString]], [[forEach]], [[count]], [[pushBack]], [[pushBackUnique]], [[apply]], [[append]], [[sort]], [[param]], [[params]], [[arrayIntersect]], [[splitString]], [[joinString]] |SEEALSO= | | [[deleteAt]], [[set]], [[resize]], [[select]], [[in]], [[find]], [[toArray]], [[toString]], [[forEach]], [[count]], [[pushBack]], [[pushBackUnique]], [[apply]], [[append]], [[sort]], [[param]], [[params]], [[arrayIntersect]], [[splitString]], [[joinString]] |SEEALSO= |
Revision as of 00:42, 17 January 2021
Description
- Description:
- Removes a range of array elements from the given array (modifies the original array, just like resize or set).
- Groups:
- Arrays
Syntax
- Syntax:
- array deleteRange [from, count]
- Parameters:
- array: Array
- [from, count]: Array
- from: Number - Array index to start selection from.
- count: Number - Number of array elements to remove. If the selected range exceeds source array boundaries, selection will be made up to the end of the array.
- Return Value:
- Nothing
Examples
- Example 1:
_arr = [1,2,3,4,5,6]; _arr deleteRange [1,4]; hint str _arr; //[1,6]
Additional Information
- See also:
- deleteAtsetresizeselectinfindtoArraytoStringforEachcountpushBackpushBackUniqueapplyappendsortparamparamsarrayIntersectsplitStringjoinString
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note