Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,15 @@
|
|||
Compare_fn:= proc(s1, s2)
|
||||
local len1, len2;
|
||||
len1 := StringTools:-Length(s1);
|
||||
len2 := StringTools:-Length(s2);
|
||||
if (len1 > len2) then
|
||||
return true;
|
||||
elif (len1 < len2) then
|
||||
return false;
|
||||
else # ascending lexicographic order for strings of equal length / case insensitive
|
||||
StringTools:-CompareCI(s1, s2);
|
||||
end if;
|
||||
end proc:
|
||||
|
||||
L := ["Here", "are", "some", "sample", "strings", "to", "be", "sorted", "Tooo"];
|
||||
sort(L, Compare_fn);
|
||||
Loading…
Add table
Add a link
Reference in a new issue