Most represented string in a TStringlist

Contestcen at Contestcen at
Sun Nov 25 06:31:58 CET 2007

Hi Is there an elegant way to determine which string is mostly represented  
a TStringList? For instance if I've got the following the function should  
return 'Delphi': StringList[0] := 'Pascal'; StringList[1] := 'Pascal';  
StringList[2] := 'Delphi'; StringList[3] := 'Delphi'; StringList[4] :=  
'Delphi'; - Wed, Nov 21 2007 1:04 pm 
1 message, 1 author

Probably the fastest way to do this is to hash each item to an  integer and 
then count the occurrences of each hash value.  
Frank Rubin

**************************************Check out AOL's list of 2007's hottest 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Gpc mailing list