BIS fnc sortAlphabetically: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(see also)
(Page filling)
Line 8: Line 8:
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>/*
| Alphabetically sort an array of strings without modifying the original. See also [[sort]]. |= Description
 
Description:
Sort an array of strings alphabetically
 
Parameter(s):
ARRAY ot STRINGs
 
Returns:
ARRAY ot STRINGs
*/
 
#define CONTROL ((finddisplay 0) displayctrl 1555)
 
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_sortAlphabetically]]; --> |= Syntax
| arrayOfStrings call [[BIS_fnc_sortAlphabetically]] |= Syntax


|p1= |= Parameter 1
|p1= arrayOfStrings: [[Array]] of [[String|strings]] |= Parameter 1


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


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



Revision as of 18:44, 4 April 2018


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:
Uncategorised

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