Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2004-03

Re: Splitting Strings at character

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt
to Taj Morton: I'm looking for a routine to create a string list from a string, with items being…
Taj Morton wrote 12 lines
Hi All, I'm looking for a routine to create a string list from a string, with items being seperated with a comma (,). For example: free,pascal,OO,linux,win32 Would create a stringlist with: free pascal OO linux win32
MyStringList.CommaText:='free,pascal,OO,linux,win32';
If there are spaces, you should enclose them in double quotes:
MyStringList.CommaText:='"free pascal","Object Oriented",linux,win32';

Michael.

Taj Morton

Hi All,
I'm looking for a routine to create a string list from a string, with items being seperated with a comma (,).

For example: free,pascal,OO,linux,win32
Would create a stringlist with:

free
pascal
OO
linux
win32

Any ideas?
Thanks, Taj