BIS fnc sortAlphabetically: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\| *((\[\[[a-zA-Z0-9_ :\\\-\/|()]+\]\],? ?)+) * \}\}" to "|seealso= $1 }}")
m (Some wiki formatting)
Line 1: Line 1:
{{RV|type=function
{{RV|type=function


| arma3
|game1= arma3


|1.10
|version1= 1.10


|gr1 = Arrays
|gr1= Arrays


|gr2 = Strings
|gr2= Strings


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


| arrayOfStrings call [[BIS_fnc_sortAlphabetically]]
|s1= arrayOfStrings call [[BIS_fnc_sortAlphabetically]]


|p1= arrayOfStrings: [[Array]] of [[String|strings]]
|p1= arrayOfStrings: [[Array]] of [[String]]s


| [[Array]] of [[String|strings]] sorted alphabetically.
|r1= [[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]]; {{cc|will return ["Geronimo", "Jane", "John", "Julia"]}}</code>


|seealso= [[BIS_fnc_sortBy]], [[BIS_fnc_sortNum]], [[sort]]
|seealso= [[BIS_fnc_sortBy]], [[BIS_fnc_sortNum]], [[sort]]
}}
}}
[[Category:{{Name|arma3}}: Functions|{{uc:sortAlphabetically}}]]

Revision as of 00:18, 18 February 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