pascalabcnet/InstallerSamples/LINQ/TextFileCount.pas
Бондарев Иван e6e67c193c initial commit
2015-05-14 21:35:07 +02:00

7 lines
263 B
ObjectPascal

begin
var d := new Dictionary<string,integer>;
foreach var s in ReadLines('TextFileCount.pas') do
foreach var word in s.ToWords(' ',':',')','(',';','''',',','.','=','<','>','[',']','+','-') do
d[word] := d.Get(word) + 1;
d.Print(NewLine);
end.