tstringlist Questions

3

Solved

Is there any integrated solution in Delphi 2007 to check whether a TStringList contains a part of a certain value? e.g.: List.AddObject('This is a string', customStringObject1); List.AddObject(...
Megass asked 9/10, 2012 at 9:18

3

Solved

I have a file .\input.txt like this: aaa bbb ccc If I read it using TStrings.LoadFromFile and write it back (even without applying any changes) using TStrings.SaveToFile, it creates an empty lin...
Scrouge asked 17/10, 2019 at 7:23

3

Solved

Is there a simple way in delphi to convert an array of strings to a tstringlist?
Obstructionist asked 4/5, 2011 at 16:35

6

Solved

I am having trouble with the delimiter in the TStringList Class. Take a look: var s: string; sl: TStringList; begin sl := TStringList.Create; s := 'Users^foo bar^bar foo^foobar^barfoo'; sl.D...
Pentathlon asked 26/8, 2009 at 14:16

1

I am using Embarcadero's Rad Studio Delphi (10.2.3) and have encountered a memory issue while reading in very large text files (7 million lines+, every line is different, lines can be 1 to ~200 cha...
Exist asked 17/10, 2018 at 14:4

4

Solved

Recently I've been informed by a reputable SO user, that TStringList has splitting bugs which would cause it to fail parsing CSV data. I haven't been informed about the nature of these bugs, and a ...
Saito asked 23/6, 2011 at 22:5

1

Solved

I have a system that loads some text files that are zipped into a ".log" file and parse then into informational classes using multiple threads that each deals with a different file and adds the par...
Aquila asked 24/10, 2017 at 13:28

2

Solved

I am attempting to open a txt file to a StringList but if I open a UTF-8 format it fails to load, this is confusing because I have Unicode XE2, am I missing something stupid here? Simple Sample S...
Quirites asked 22/6, 2017 at 10:33

3

Solved

I must compare 2 stringlist , I wonder if the search the first stringlist inside the second stringlist is the only or the recommended version to execute this problem My code would go like this ...
Softboiled asked 27/7, 2013 at 7:29

2

Solved

When I save the object from TStringList class file content to a file, the file is saved with UTF-8 correctly but UTF-8 with BOM by default. My code is: myFile := TStringList.Create; try myFile.T...
Clywd asked 28/8, 2015 at 15:33

1

Solved

I'm running Delphi RAD Studio XE2. I have some very large files, each containing a large number of lines. The lines themselves are small - just 3 tab separated doubles. I want to load a file into ...
Spirited asked 19/11, 2014 at 2:28

4

Solved

I frequently find that I need to 'resize' a a TStringList to hold exactly N elements, either adding additional empty strings to the list, or deleting unneccessary ones. On a C++ STL container I co...
Barracoon asked 13/1, 2014 at 9:58

4

Solved

I have an app that needs to do heavy text manipulation in a TStringList. Basically i need to split text by a delimiter ; for instance, if i have a singe line with 1000 chars and this delimiter occu...
Niko asked 24/10, 2013 at 13:25

8

Solved

what is the difference in using a standard type sl: TStringList compared to using a generic TList type sl: TList<string> ? As far as I can see, both behave exactly the same. Is ...
Daile asked 10/11, 2008 at 22:50

3

Solved

I have a list of strings stored in TStringList, i want to convert it into string seperated by commas and i use the following code channelList: TStringList; aCurrentChannel := Stringreplace(channel...
Equilibrist asked 16/7, 2013 at 8:6

2

Solved

I am parsing a dataset and assigning values to TStringList i want to avoid the duplicates. I use the following code but still duplicates are inserted. channelList := TStringList.Create; channelL...
Hecklau asked 16/7, 2013 at 8:47

1

Solved

In my application, when I want import a file, i use TStringList. But, when someone export data from Excel, the file encoding is UCS-2 Little Endian, and TStringList can't read the data. There is ...
Pernick asked 26/4, 2013 at 15:44

1

Solved

The first procedure : procedure TestOne(List : TStringList); var TempList : TStringList; begin TempList := TStringList.Create; TempList.Add('Test'); List := TempList; TempList.Free; end; pro...
Whig asked 23/1, 2013 at 3:1

1

Solved

Why does Memo.Lines use the abstract class TStrings? Why doesn't it use TStringList instead? And should I convert it to TStringList before working with it?
Hughmanick asked 20/6, 2012 at 14:50

4

This is my delimited text: $HEHDT,10.17,T*28$HEHDT,10.18,T*2A and so on... The comma is my sentence delimiter. However, I want to use the asterisk as my delimiter as well. Output I want to achiev...
Abnormality asked 27/2, 2012 at 2:31

4

Solved

Why variables are declared as TStrings and created as TStringList? eg: the var sl is declared as TStrings but created as TStringList var sl : TStrings; begin sl := TStringList.Create; // add ...
Adanadana asked 21/2, 2012 at 14:51

1

Solved

I'm doing a simple StringList.sort, but Delphi uses a QuickSort that is not a stable sort, meaning it may change the relative order of records with equal keys. I need to use a stable sort. What wo...
Mating asked 15/2, 2012 at 23:52

2

I read with interest Nick Hodges blog on Why You Should Be Using Interfaces and since I'm already in love with interfaces at a higher level in my coding I decided to look at how I could extend thi...
Wismar asked 1/2, 2012 at 12:37

6

how can i load millions of records from tadotable into a stringlist very fast? procedure TForm1.SlowLoadingIntoStringList(StringList: TStringList); begin StringList.Clear; with SourceTable do b...
Tondatone asked 7/12, 2011 at 11:18

1

Solved

Using delphi 7: How can I add an integer to the object portion of a stringlist item, using AddObject? How can I retrieve the integer back from a object property of stringlist item? How do I free ...
Pyrogen asked 30/8, 2011 at 1:6

© 2022 - 2024 — McMap. All rights reserved.