Powered By GitBook
SORT_CASE_SENSITIVE
Sort a list of texts or numbers (case-sensitive)

Description

Returns a list containing all the values in the given list of texts or numbers, sorted in order.
This function performs a case-sensitive sort, meaning that all the upper case letters follow all the lower case letters. This is for advanced use only, because typically you would like to perfrom a case insensitive sort, so unless you have a reason to sort case-sensitively then you should use SORT instead!

Function signature

1
SORT_CASE_SENSITIVE(list: Array<number>|Array<string>, order: String = asc) => Array
Copied!
Parameter
Description
List
List to sort
Order
Order to sort in ("asc" for ascending, "desc" for descending)

Examples

1
textArray = ["ABCD","CC","bb","AA","a","aa","abcd"]
2
array = [10,1,2,6,-1,10,12]
Copied!
Formula
Return value
SORT_CASE_SENSITIVE(textArray)
["AA","ABCD","CC","a","aa","abcd","bb"]
SORT_CASE_SENSITIVE(array)
[-1,1,2,6,10,10,12]
SORT_CASE_SENSITIVE(array, "desc")
[12,10,10,6,2,1,-1]
Last modified 10mo ago
Export as PDF
Copy link