Ar SortEditor

From GECK
Jump to: navigation, search


A function added by the JohnnyGuitar NVSE Plugin.

Description

Sorts elements of an array of forms (References or Base Forms) alphabetically (or reverse-alphabetically) using their Editor IDs, and returns a new array containing the elements in sorted order.

Syntax

[help]
(array) Ar SortEditor source:formArray sortReverse:bool

Example

array_var aOriginal
array_var aSorted

let aOriginal := Ar_List SunnyREF, EasyPeteRef, GSChetRef

let aSorted := Ar_SortEditor aOriginal ; EasyPeteRef, GSChetRef, SunnyREF

let aSorted := Ar_SortEditor aOriginal, 1 ; SunnyREF, GSChetRef, EasyPeteRef

See Also