BIS fnc consolidateArray: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - " |GROUP1" to "|GROUP1=") |
m (Text replacement - "\[\[Category\:Function Group\: Arrays(\|\{\{[a-zA-Z0-9_:]+\}\})?\]\]" to "") |
||
Line 39: | Line 39: | ||
<h3 style="display:none">Bottom Section</h3> | <h3 style="display:none">Bottom Section</h3> | ||
[[Category:Functions|{{uc:consolidateArray}}]] | [[Category:Functions|{{uc:consolidateArray}}]] | ||
[[Category:{{Name|arma3}}: Functions|{{uc:consolidateArray}}]] | [[Category:{{Name|arma3}}: Functions|{{uc:consolidateArray}}]] |
Revision as of 13:00, 12 October 2020
Description
- Description:
- Finds duplicities in the given array of anything and consolidates them into an array of sub-arrays
- Execution:
- call
- Groups:
- Arrays
Syntax
- Syntax:
- array call BIS_fnc_consolidateArray
- Parameters:
- array: Array - array of anything
- Return Value:
- Array - array of sub-arrays in format [[value, count],...], where:
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:
- 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