Skip to content

SortDescending

Dennis Corvers edited this page Oct 23, 2026 · 2 revisions

Enumerable:sortDescending

Sorts values in descending order using Lua's > comparison.

Syntax

ordered = source:sortDescending()

Parameters

This method has no parameters.

Returns

A deferred Enumerable that buffers and sorts the source values when enumerated.

Remarks

Values must be comparable with Lua's > operator. orderDecending (with this spelling) is an alias.

Example

local orderedDrops = LuaQ.from({ "Coins", "Abyssal whip", "Rune platebody" })
    :sortDescending()
    :toTable()
-- Sorts item names in descending lexicographic order

See also

Sort · SortByDescending · ThenByDecending · Functions

Clone this wiki locally