1. Sort insensitive
- Posted by Terry Constant <constant at FLASH.NET> Jun 21, 1998
- 610 views
I am still a bit unsure about the most efficient ways to work with sequences. I wanted a case insensitive sort, so I used custom_sort() for the first time. I defined sorti() as shown below: --Rsort.e include sort.e integer iInsensitive function CompareInsensitive(sequence a, sequence b) return compare(upper(a[1]),upper(b[1])) end function iInsensitive = routine_id("CompareInsensitive") global function sorti(sequence s) --/ Do a case insensitive sort return custom_sort(iInsensitive, s) end function --sorti --end file I am going to be sorting some large sequences, case insensitive. Is the code above the fastest way to do it using normal Euphoria routines and statements? -- Terry Constant mailto:constant at flash.net