TStringList and TFDMemTable Contribute To The Powerhouse That Is Cross Platform Delphi Development In FireMonkey
July 26, 2020
July 26, 2020
[SHOWTOGROUPS=4,20,22]
One of my all time favorite objects in Delphi is TStringList which I have been using for over 20 years. Most apps I write with Delphi usually contain at least one usage of TStringList. I rarely use arrays as TStringList usually fills that space in my toolchest (the Для просмотра ссылки Войдиили Зарегистрируйся makes them tempting though). TFDMemTable is becoming the new TStringList for me though as now I rarely write an app that doesn’t use a TFDMemTable at least once. Yet TStringList is still use at least once as well!
TStringList is such a versatile object because it supports easily returning it’s contents as a string and saving/loading those same contents from a file. It easily handles key value pairs, splitting strings, and holding whatever string list (as the name implies) in memory. It handles sorting and even custom sorting. It can hold a list of objects that are tied to a string name and it can even free those objects automatically with the OwnsObjects property. It can ignore duplicates like an index database table. It can even be easily searched using IndexOf or Find.
Some of my favorite TStringList methods are TStringList.SaveToFile(), TStringList.LoadFromFile(), TStringList.SaveToStream(), TStringList.LoadFromStream(), TStringList.Append(), TStringList.AddObject(), TStringList.AddStrings(), and TStringList.IndexOfName(). While the properties I use most are probably TStringList.Text, TStringList.ValueFromIndex, and TStringList.Values. You can find a full breakdown of all of these methods and properties over in the Для просмотра ссылки Войдиили Зарегистрируйся.
The details are lost but I think I even used TStringList and the legendary FastStrings library at the core of a search engine index I built at the dawn of the new millennium with ~100,000 records. The results were returned in a second or two.
[/SHOWTOGROUPS]
One of my all time favorite objects in Delphi is TStringList which I have been using for over 20 years. Most apps I write with Delphi usually contain at least one usage of TStringList. I rarely use arrays as TStringList usually fills that space in my toolchest (the Для просмотра ссылки Войди
TStringList is such a versatile object because it supports easily returning it’s contents as a string and saving/loading those same contents from a file. It easily handles key value pairs, splitting strings, and holding whatever string list (as the name implies) in memory. It handles sorting and even custom sorting. It can hold a list of objects that are tied to a string name and it can even free those objects automatically with the OwnsObjects property. It can ignore duplicates like an index database table. It can even be easily searched using IndexOf or Find.
Some of my favorite TStringList methods are TStringList.SaveToFile(), TStringList.LoadFromFile(), TStringList.SaveToStream(), TStringList.LoadFromStream(), TStringList.Append(), TStringList.AddObject(), TStringList.AddStrings(), and TStringList.IndexOfName(). While the properties I use most are probably TStringList.Text, TStringList.ValueFromIndex, and TStringList.Values. You can find a full breakdown of all of these methods and properties over in the Для просмотра ссылки Войди
The details are lost but I think I even used TStringList and the legendary FastStrings library at the core of a search engine index I built at the dawn of the new millennium with ~100,000 records. The results were returned in a second or two.
[/SHOWTOGROUPS]