arrayIntersect: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{Command " to "{{RV|type=command ")
m (Text replacement - ";{{cc|" to "; {{cc|")
Line 28: Line 28:
|x4= Also works with array elements which are [[isEqualTo|equal]]:<code> [[hint]] [[str]] ([[1],[2],[3]] [[arrayIntersect]] [[2],[3],[4]]); // [[2],[3]]</code>
|x4= Also works with array elements which are [[isEqualTo|equal]]:<code> [[hint]] [[str]] ([[1],[2],[3]] [[arrayIntersect]] [[2],[3],[4]]); // [[2],[3]]</code>


|x5= This command is case sensitive:<code>["cAse"] [[arrayIntersect]] ["cAse"];{{cc|["cAse"]|true}}
|x5= This command is case sensitive:<code>["cAse"] [[arrayIntersect]] ["cAse"]; {{cc|["cAse"]|true}}
["cAse"] [[arrayIntersect]] ["casE"];{{cc|[]|true}}</code>
["cAse"] [[arrayIntersect]] ["casE"]; {{cc|[]|true}}</code>


| [[append]], [[set]], [[pushBack]], [[pushBackUnique]], [[apply]], [[select]], [[resize]], [[reverse]], [[count]], [[find]], [[in]], [[forEach]], [[deleteAt]], [[deleteRange]], [[sort]], [[param]], [[params]], [[toArray]], [[toString]], [[splitString]], [[joinString]], [[BIS_fnc_arrayPushStack]], [[BIS_fnc_arrayPush]]
| [[append]], [[set]], [[pushBack]], [[pushBackUnique]], [[apply]], [[select]], [[resize]], [[reverse]], [[count]], [[find]], [[in]], [[forEach]], [[deleteAt]], [[deleteRange]], [[sort]], [[param]], [[params]], [[toArray]], [[toString]], [[splitString]], [[joinString]], [[BIS_fnc_arrayPushStack]], [[BIS_fnc_arrayPush]]

Revision as of 15:55, 16 February 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
Arrays

Syntax

Syntax:
Syntax needed
Parameters:
array1: Array
array2: Array
Return Value:
Return value needed

Examples

Example 1:
_arr1 = [1,2,3,4,5,2,3,4]; _arr2 = [4,5,6,1,2,3,5,6]; hint str (_arr1 arrayIntersect _arr2); // [4,5,1,2,3]
Example 2:
_arr = [1,2,3,1,2,3,1,2,3,4,5]; hint str (_arr arrayIntersect _arr); // [1,2,3,4,5]
Example 3:
Remove nils: hint str ([1,2,nil,3] arrayIntersect [1,2,nil,3]); // [1,2,3]
Example 4:
Also works with array elements which are equal: hint str ([[1],[2],[3]] arrayIntersect [[2],[3],[4]]); // [[2],[3]]
Example 5:
This command is case sensitive:["cAse"] arrayIntersect ["cAse"]; // ["cAse"] ["cAse"] arrayIntersect ["casE"]; // []

Additional Information

See also:
See also needed

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