Page 1 of 1

Fast binary sort for strings in a list?

Posted: Fri Aug 15, 2025 6:48 pm
by camille
Hello :D

Has anyone ever written a fast sort function (for strings inside a list) for Windows that compares by character value?
Which means that e.g.:

Code: Select all

! < ... < A < B ...< \ ... < a < b ... <  } ...
It would be cool if this would be UTF-8 compatible...

The normal SortList() doesn't work this way and something like:

Code: Select all

SELECT * FROM temp ORDER BY FullPath COLLATE BINARY ASC
within SQLite sorts differently as well...

Regards,
camille

Re: Fast binary sort for strings in a list?

Posted: Fri Aug 15, 2025 7:25 pm
by AZJIO
Show your example with SortList. I did it and it works for me. I want to see yours.

Re: Fast binary sort for strings in a list?

Posted: Fri Aug 15, 2025 7:56 pm
by camille
:oops: Don't ask me why but now it works here as well...

I'm getting old I fear :shock:

Thank you, AZJIO!

Re: Fast binary sort for strings in a list?

Posted: Sat Aug 16, 2025 4:52 pm
by skywalk
Search forum for qsort and custom callback.
Nothing is faster.