listSort: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(New page: ==Function assert== Returns a sorted list. ===Usage=== <source lang="mtmacro" line> [h: listSort(list, sortType)] </source> The sortType determines the type of sort to use. If sortType is...)
 
No edit summary
Line 4: Line 4:
===Usage===
===Usage===
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: listSort(list, sortType)]
[listSort(list, sortType)]
</source>
</source>
The sortType determines the type of sort to use.
The sortType determines the type of sort to use.

Revision as of 18:28, 21 January 2009

Function assert

Returns a sorted list.

Usage

[listSort(list, sortType)]

The sortType determines the type of sort to use. If sortType is "A", normal alphabetic sorting is used, and "Monster11" comes before "Monster3". (Default behavior) If sortType is "N", the first number in each entry is effectively padded to 4 digits, so that "Monster3" comes before "Monster11". The sortType can have a second character of "+" or "-" to specify an ascending or descending sort.