Lucee Function Reference
listsort()
Sorts list elements according to a sort type and sort order.
Beispiel
listsort(string list,string sort_type,[string sort_order,[string delimiters,[boolean includeEmptyFields]]]):string
Kategorie
list,string,sort
Argumente
Die Argumente für diese Funktion sind fest vorgegeben. Ausser den nachfolgenden Argumenten dürfen keine weiteren verwendet werden.
Name | Typ | Required | Default Value | Beschreibung |
---|---|---|---|---|
list | string | Yes | a string list | |
sort_type | string | Yes |
there are different sort types: - numeric (sort by number) - text (sorts text alphabetically and case sensitive) - textnocase (sorts text alphabetically and ignore case sensitivity) |
|
sort_order | string | No | asc |
sort direction: - asc(default): ascending sort order - desc: descending sort order |
delimiters | string | No | , | Characters that separate list elements. The default value is comma. |
includeEmptyFields | boolean | No | if set to true, empty values are included as well |