BIS fnc sortAlphabetically: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "^ \{\{(Command|Function)" to "{{$1") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...) |
||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
| arma3 | | arma3 | ||
|1.10|= Game version | |1.10|= Game version | ||
|gr1 = Arrays | |gr1 = Arrays | ||
|gr2 = Strings | |gr2 = Strings | ||
| Alphabetically sort an array of strings without modifying the original. See also [[sort]]. | | Alphabetically sort an array of strings without modifying the original. See also [[sort]]. | ||
| arrayOfStrings call [[BIS_fnc_sortAlphabetically]] | | arrayOfStrings call [[BIS_fnc_sortAlphabetically]] | ||
|p1= arrayOfStrings: [[Array]] of [[String|strings]] | |p1= arrayOfStrings: [[Array]] of [[String|strings]] | ||
| [[Array]] of [[String|strings]] sorted alphabetically. | | [[Array]] of [[String|strings]] sorted alphabetically. | ||
|x1= <code>_sortedNames = ["John", "Jane", "Julia", "Geronimo"] call [[BIS_fnc_sortAlphabetically]]; {{codecomment|// will return ["Geronimo", "Jane", "John", "Julia"]}}</code> | |x1= <code>_sortedNames = ["John", "Jane", "Julia", "Geronimo"] call [[BIS_fnc_sortAlphabetically]]; {{codecomment|// will return ["Geronimo", "Jane", "John", "Julia"]}}</code> | ||
| [[BIS_fnc_sortBy]], [[BIS_fnc_sortNum]], [[sort]] | | [[BIS_fnc_sortBy]], [[BIS_fnc_sortNum]], [[sort]] | ||
}} | }} |
Revision as of 23:44, 17 January 2021
Description
- Description:
- Alphabetically sort an array of strings without modifying the original. See also sort.
- Execution:
- call
- Groups:
- ArraysStrings
Syntax
- Syntax:
- arrayOfStrings call BIS_fnc_sortAlphabetically
- Parameters:
- arrayOfStrings: Array of strings
- Return Value:
- Array of strings sorted alphabetically.
Examples
- Example 1:
_sortedNames = ["John", "Jane", "Julia", "Geronimo"] call BIS_fnc_sortAlphabetically; // will return ["Geronimo", "Jane", "John", "Julia"]
Additional Information
- See also:
- BIS_fnc_sortByBIS_fnc_sortNumsort
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