Ar SortAlpha

From the Oblivion ConstructionSet Wiki
Revision as of 12:25, 18 September 2010 by imported>QQuix (Organizing the Array Functions category list)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
< [[::Category:Functions|Category:Functions]]

A function added by the Oblivion Script Extender.

Syntax:

(sortedArray:Array) ar_SortAlpha toSort:array sortDescending:bool

Sorts the elements of an array alphabetically in ascending or descending order and returns a new Array containing the elements in sorted order. Ordering is case-insensitive. Unlike ar_Sort, ar_SortAlpha does not require elements to be of the same type - numeric elements are converted to a string representation, and forms are sorted by their names (if named) or the string representation of their formIDs. Omitting the optional parameter causes elements to be sorted in ascending order.