BIS fnc sortAlphabetically: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category\:Function Group\: Arrays(\|\{\{[a-zA-Z0-9_:]+\}\})?\]\]" to "")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:


{{Function|Comments=
{{Function|Comments=
____________________________________________________________________________________________


| arma3 |Game name=
| arma3 |Game name=
Line 10: Line 9:


|gr2 = Strings |GROUP2=
|gr2 = Strings |GROUP2=
____________________________________________________________________________________________


| Alphabetically sort an array of strings without modifying the original. See also [[sort]]. |DESCRIPTION=
| Alphabetically sort an array of strings without modifying the original. See also [[sort]]. |DESCRIPTION=
____________________________________________________________________________________________


| arrayOfStrings call [[BIS_fnc_sortAlphabetically]] |SYNTAX=
| arrayOfStrings call [[BIS_fnc_sortAlphabetically]] |SYNTAX=
Line 20: Line 17:


| [[Array]] of [[String|strings]] sorted alphabetically. |RETURNVALUE=
| [[Array]] of [[String|strings]] sorted alphabetically. |RETURNVALUE=
____________________________________________________________________________________________


|x1= <code>_sortedNames = ["John", "Jane", "Julia", "Geronimo"] call [[BIS_fnc_sortAlphabetically]]; {{codecomment|// will return ["Geronimo", "Jane", "John", "Julia"]}}</code> |EXAMPLE1=
|x1= <code>_sortedNames = ["John", "Jane", "Julia", "Geronimo"] call [[BIS_fnc_sortAlphabetically]]; {{codecomment|// will return ["Geronimo", "Jane", "John", "Julia"]}}</code> |EXAMPLE1=
____________________________________________________________________________________________


| [[BIS_fnc_sortBy]], [[BIS_fnc_sortNum]], [[sort]] |SEEALSO=
| [[BIS_fnc_sortBy]], [[BIS_fnc_sortNum]], [[sort]] |SEEALSO=

Revision as of 00:55, 17 January 2021


Hover & click on the images for description

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

Notes

Bottom Section