all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
|
|
@ -0,0 +1,23 @@
|
|||
fn myCmp str1 str2 =
|
||||
(
|
||||
case of
|
||||
(
|
||||
(str1.count < str2.count): 1
|
||||
(str1.count > str2.count): -1
|
||||
default:(
|
||||
-- String compare is case sensitive, name compare isn't. Hence...
|
||||
str1 = str1 as name
|
||||
str2 = str2 as name
|
||||
case of
|
||||
(
|
||||
(str1 > str2): 1
|
||||
(str1 < str2): -1
|
||||
default: 0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
strList = #("Here", "are", "some", "sample", "strings", "to", "be", "sorted")
|
||||
qSort strList myCmp
|
||||
print strList
|
||||
Loading…
Add table
Add a link
Reference in a new issue