[fpc-devel] TStringList.CustomSort

Michael Van Canneyt michael.vancanneyt at wisa.be
Tue Nov 7 10:16:51 CET 2006



On Tue, 7 Nov 2006, Micha Nelissen wrote:

> Michael Van Canneyt wrote:
> > The purpose of Customsearch is to sort the list once using a custom
> > sorting algorithm.
> 
> That reduces its usefulness, and why I said it's a broken design :).

Maybe, but it's implemented to be delphi compatible.

What could be done is to introduce a new property 'CompareStrings' which 
is a callback used by the sort function, which does what you ask. 
By default this can then be the 'CompareText()' function of sysutils.

But I would like to know what the impact on speed is before doing this.
(although I suspect the impact to be minimal)

Michael.



More information about the fpc-devel mailing list