arrayIntersect: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) (example) |
Killzone Kid (talk | contribs) (category) |
||
Line 33: | Line 33: | ||
}} | }} | ||
[[Category:Arma 3: New Scripting Commands List|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting_Commands_Arma_3]] | [[Category:Scripting_Commands_Arma_3]] | ||
Revision as of 10:57, 25 June 2015
Description
- Description:
- Intersects array1 with array2 returning array of unique common elements. Additionally, using the same array for array1 and array2 will simply return array of unique elements.
- Groups:
- Uncategorised
Syntax
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]
Additional Information
- See also:
- appendsetpushBackresizereversecountfindinforEachdeleteAtdeleteRangesortparamparamstoArraytoStringBIS_fnc_arrayPushStackBIS_fnc_arrayPush
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
[[Category:Introduced with arma3dev version 1.47]][[ Category: arma3dev: New Scripting Commands | ARRAYINTERSECT]][[ Category: arma3dev: Scripting Commands | ARRAYINTERSECT]]