Mark does this help
procedure Split(const S: string; List: TStrings; Sep: char);
var
i, StartPos, Pos: integer;
begin
StartPos := 1;
Pos := 1;
for i := 1 to Length(S) do
begin
if (S[i] = Sep) or (i = Length(S)) then
if StartPos = Pos then
begin
Pos := i+1;
if Pos = Length(S)+1 then inc(Pos);
List.Add(copy(S,StartPos,Pos-StartPos-1));
StartPos := Pos;
end;
end;
end;
----- Original Message -----
From: Mark Howard <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Saturday, 5 May 2001 06:15
Subject: [DUG]: Accessing 'Fields' in a String List
Hi
I have a TStringList in which each of the strings is itself a comma
delimited list of 5 fields.
Is there a TStrings method that lets me access these fields directly, or do
I have to chop the string myself?
TIA
Mark
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"