Questions tagged [tstringlist]

TStringList is a RTL class whose purpose is to store and manipulate a list of strings. It is defined in Classes.pas

163 questions
-1
votes
2 answers

Delphi, Lazarus - Listbox out of bound (0) TString

I simply can't seem to make any sense of the following error. Listbox out of bound (0) TString I have a form or window with a listbox and following code is supposed to work with it. It suppose to get a list of strings from an ini file and set to the…
ThN
  • 3,041
  • 2
  • 47
  • 108
-1
votes
2 answers

TIniFile.WriteString(Section,Key,Value) changed value automatically

When Value is a quoted-string, quotation marks (") are removed automatically. It means that, two following statement, A.WriteString('Section','Key','"abcde"') and A.WriteString('Section','Key','abcde') are not different. Please see my code (it is…
kien_coi_1997
  • 125
  • 1
  • 12
-2
votes
1 answer

Delphi compare 2 stringlists by substring search and merge the matching items in another stringlist

I'm trying to compare 2 stringlist by substring search, and match the found items into another stringlist. "Stringlist_SCSILogicalUnit" contains data…
user2858981
  • 235
  • 4
  • 23
-2
votes
1 answer

How to get values from a field and assign to a TStringList?

How do I get all the username values from the image below and can convert them into TStringList, strings or TMemo? I tried the following code but it didn't work. with q3 do var txResul:stringlist begin Close; SQL.Clear; …
-2
votes
3 answers

Delphi load name/value pair from text file

Want to load name value pairs into a TStringList. have a text file with data: a=ant a=animal b=bob d=darn Function to load it: LoadData(argPath: string): TStringList; var data: TStringList; begin data := TStringList.Create(true); …
O.O
  • 10,083
  • 18
  • 83
  • 166
-3
votes
1 answer

delphi - count duplicates in list and sort

I need count string duplicates and after sort them by DESC example: stringlist 111 222 333 111 222 111 I need to get 111(3) 222(2) 333(1) Can someone help?
-3
votes
1 answer

I need to make groups of 4-4-3 out of this shuffledClassroom list

static void Main(string[] args) { List classroom = new List { "Armen", "Babken", "Hayk", "Edgar", "Tatev", "Anna", "Aram", "Karo", "Baghdig", "Harut", "Ruzanna" }; foreach (string student in classroom) { …
-3
votes
2 answers

How to convert List to xml document in c#

I would like to convert the List to a xml document in c#. My code is as follows: List BugWSResponseList1 = new List(); Logger.Write("\n\n" + DateTime.Now + " : " + " : START : Creation of a set of Bugs via bug.Add…
user2764162
  • 35
  • 1
  • 8
-4
votes
1 answer

Delphi 7 - split string with strict delimiter without using new procedures

I need to split the following string into a TStringList using '|' as the only Delimiter: " 0.985,EError can't find,E| 0,5186,Name,6946" Then I need to split each TStringList item using ',' as the only `Delimiter. So, in the first TStringList would…
Grow
  • 11
  • 1
  • 3
-4
votes
1 answer

How to get the value of csv text and insert into access

I have a string like this from my memo1: model,"GHN-888",id,"00000000",date,"04-21-2016",type,1 how can I make it like this: Model = GHN-888 id = 00000000 date = 04/21/2016 type = 1 Is this possible? Thanks in advance.
-4
votes
2 answers

TStringlist not loading Google Contacts file

I'm trying to use a Stringlist to load a CSV file generated by Google Contacts. When i open this file in an text editor like Sublime Text, i can see the contents properly, with 75 lines. This is a sample from the Google Contacts file : Name,Given…
delphirules
  • 5,259
  • 13
  • 43
  • 87
-4
votes
1 answer

How can I speed this up from being rather slow

I have the following code that I use on a form used for a mailing project. I have a form I can call with one of the stringlists to add more contacts. That is working OK but when I 'return' from selecting contacts and call my SetupMail it takes very…
OZ8HP
  • 1,337
  • 4
  • 28
  • 56
-6
votes
3 answers

Delphi - Get line index and data index from given data

So I have list of data that may contain different charters: 1dAAbt54 agFlE9dA 1295RTdd First line data contains: 1d, AA, bt, 54. All I need is function that gives me the data of given index. Example: data of index 6 is Fl (Line - 2, Index in line…
Little Helper
  • 2,337
  • 7
  • 35
  • 64
1 2 3
10
11