BIS fnc consolidateArray: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <nowiki>[</nowiki>" to " [<nowiki/>") |
m (Text replacement - "|Game version=" to "|Game version= |gr1= Arrays |GROUP1") |
||
Line 5: | Line 5: | ||
|0.76|Game version= | |0.76|Game version= | ||
|gr1= Arrays |GROUP1 | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Revision as of 09:22, 6 October 2020
Description
- Description:
- GROUP1 ____________________________________________________________________________________________
- Execution:
- call
- Groups:
- Arrays
Syntax
- Syntax:
- Finds duplicities in the given array of anything and consolidates them into an array of sub-arrays
- Parameters:
- array: Array - array of anything
- Return Value:
- array call BIS_fnc_consolidateArray
Examples
- Example 1:
["apple","apple","pear","pear","apple"] call BIS_fnc_consolidateArray; // Return: [["apple",3],["pear",2]]
- Example 2:
["apple","apple",1,1,nil,nil] call BIS_fnc_consolidateArray; // Return: [["apple",2],[1,2],[any,2]]
Additional Information
- See also:
- Array - array of sub-arrays in format [[value, count],...], where:
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