Lucee Function Reference
Function ARRAYSORT
Sorts array elements numerically or alphanumerically.
Example
arraysort(object array,object sorttype_or_closure,[string sort_order,[boolean locale_sensitive]]):boolean
Arguments
The arguments for this function are set. You can not use other arguments except the following ones.
Name | Type | Required | Default Value | Description |
---|---|---|---|---|
array | object | Yes | Name of an array | |
sorttype_or_closure | object | Yes |
value can be a string or a closure/function. a string must be one of the following values: if you define a closure/function, the closure/function must accept 2 parameters of any type and return: 0, if first parameter is equal to second parameter 1, first parameter is "bigger" than second parameter |
|
sort_order | string | No | asc |
sort direction: |
locale_sensitive | boolean | No | false | if true it does a locale sensitive sorting. |