Finding and sorting by diacriticals again

yves COPPE yvescoppe at skynet.be
Wed Mar 12 07:27:01 EST 2003


Hello,


wouter Abraham gave us a fantastic international  sort handler for a 
list of items

This is his same handler but for a list (of lines) (for those who are 
newbies in RR)
So it can easily be used for sorting in other languages as f.ex. 
French (as for me)
don't forget the custom property : SortOrder
the list of this property was given in the original script.

function ctnSort pTextToSort
   get the SortOrder of me
   repeat for each line kk in it
     put kk after so
   end repeat
   set the caseSensitive to true
   repeat for each line ii in pTextToSort
     repeat for each char cc in ii
       put offset(cc,so) & space after tempVar
     end repeat
     delete last char of tempVar
     put tempVar & "," & ii & cr after theSorter
     put "" into tempVar
   end repeat
   sort lines of theSorter numeric by first item of each
   repeat for each line ll in theSorter
     put item 2 of ll & cr after theResult
   end repeat
   return char 1 to -2 of theResult
end ctnSort

Thank to the author of this wonderful, powerful, easy and quick script
-- 
Greetings.

Yves COPPE

Email : yvescoppe at skynet.be



More information about the use-livecode mailing list