createHashMapFromArray: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\|game([0-9]) ?= (.+) \|version([0-9]) ?= (.+) " to "|game$1= $2 |version$3= $4 ") |
Lou Montana (talk | contribs) m (Text replacement - " \| *(game[0-9]|version[0-9]|gr[0-9]|serverExec|mp|pr|descr|s[0-9]|p[0-9]{1,3}|r[0-9]|x1?[0-9]|seealso) *= +" to " |$1= ") |
||
Line 31: | Line 31: | ||
|x3= <code>[1,2,3] [[createHashMapFromArray]] ["one","two","three","four"];{{cc|Returns [[1,"one"],[2,"two"],[3,"three"]]}}</code></code> | |x3= <code>[1,2,3] [[createHashMapFromArray]] ["one","two","three","four"];{{cc|Returns [[1,"one"],[2,"two"],[3,"three"]]}}</code></code> | ||
|seealso= | |seealso= [[createHashMap]] | ||
}} | }} |
Revision as of 22:02, 19 June 2021
Description
Syntax
- Syntax:
- createHashMapFromArray [[key1, value1], [key2, value2]]
- Parameters:
- key: HashMapKey
- value: Anything
- Return Value:
- HashMap
Alternative Syntax
- Syntax:
- keys createHashMapFromArray values Template:Since
- Parameters:
- keys: Array - Array of HashMapKeys
- values: Array - Array of anything
- Return Value:
- HashMap
Examples
- Example 1:
createHashMapFromArray [["a",1], ["b",2], ["c",3]];
- Example 2:
[1,2,3,4] createHashMapFromArray [];// Returns [[1,<null>],[2,<null>],[4,<null>],[3,<null>]]
- Example 3:
[1,2,3] createHashMapFromArray ["one","two","three","four"];// Returns [[1,"one"],[2,"two"],[3,"three"]]
Additional Information
- See also:
- createHashMap
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