BIS fnc sortAlphabetically: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>\[\[private\]\] (_?[a-zA-Z0-9_]+) = \[([^\[]*)\] \[\[(call|spawn)\]\] \[\[(BI(N|S)_fnc_[a-zA-Z0-9_]+)\]\];? \{\{cc\|([^ ]+)\}\}<\/code>" to "<sqf>private $1 = [$2] $3 $4; // $5</sqf>") |
Lou Montana (talk | contribs) m (Fix regex) |
||
Line 16: | Line 16: | ||
|r1= [[Array]] of [[String|strings]] sorted alphabetically. | |r1= [[Array]] of [[String|strings]] sorted alphabetically. | ||
|x1= <sqf>private _sortedNames = ["John", "Jane", "Julia", "Geronimo"] call BIS_fnc_sortAlphabetically; // | |x1= <sqf>private _sortedNames = ["John", "Jane", "Julia", "Geronimo"] call BIS_fnc_sortAlphabetically; // will return ["Geronimo", "Jane", "John", "Julia"]</sqf> | ||
|seealso= [[BIS_fnc_sortBy]] [[BIS_fnc_sortNum]] [[sort]] | |seealso= [[BIS_fnc_sortBy]] [[BIS_fnc_sortNum]] [[sort]] | ||
}} | }} |
Revision as of 13:38, 1 July 2022
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:
Additional Information
- See also:
- BIS_fnc_sortBy BIS_fnc_sortNum sort
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