Uses
IniFiles,
...
Var
List : THashedStringList;
// create list
List := THashedStringList;
// add each word
List.Value[WordToAdd] := IntToStr(StrToIntDef(List.Value[WordToAdd],
0)+1);
//dump list
for i :== 0 to List.Count-1 do
WriteLn('Word=', List.Names[i], ' Count=',List.ValuesFromIndex[i]);
// free list
List.Free
Doug
Andries Bos wrote:
> Hello
>
> a simple question, but I can't remember the answer.
>
> I'm scrolling through a list of strings one by one (e.g. all words in a rich
> edit) and I want to count how much unique words I have and how often these
> words have been used.
>
> any ideas?
>
> regards, Andries
>
>
>
> ________________________________
>
> Slide scanning / dia's scannen
> vanaf / from
> E0,08c
> www.scancare.nl
>
> ________________________________
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> -----------------------------------------------------
> Home page: http://groups.yahoo.com/group/delphi-en/
> To unsubscribe: [email protected]! Groups Links
>
>
>
>
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.409 / Virus Database: 270.14.1/2407 - Release Date: 10/01/09
> 06:34:00
>
>
[Non-text portions of this message have been removed]