Details
Assignee
UnassignedUnassignedReporter
Sebastian ZartnerSebastian ZartnerNew Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Priority
New
Details
Details
Assignee
Unassigned
UnassignedReporter
Sebastian Zartner
Sebastian ZartnerNew Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Priority
Created 3 April 2018 at 09:24
Updated 16 February 2021 at 16:35
The different sorting functions provide an option to specify the type of sorting to apply, which can currently be either
numeric
,text
, ortextnocase
.This option should be extended by a
natural
value to allow human-like sorting, i.e. sorting numbers in strings by their value.E.g.:
Code:
<cfset testArray = ["foo100", "foo1", "foo10", "foo2", "foo20"]> <cfset arraySort(testArray, "natural")> <cfdump var="#testArray#">
Output:
Array
1 string foo1
2 string foo2
3 string foo10
4 string foo20
5 string foo100