Delphi: StringList Delimiter is always a space character even if Delimiter is set
Posted
by pr0wl
on Stack Overflow
See other posts from Stack Overflow
or by pr0wl
Published on 2009-08-26T14:16:08Z
Indexed on
2010/03/08
22:51 UTC
Read the original article
Hit count: 1096
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.Delimiter := '^';
sl.DelimitedText := s;
ShowMessage(sl[1]);
end;
sl[1] SHOULD return 'foo bar'
sl[1] DOES return 'foo'
It seems that the delimiter is now '^'
AND ' '
Any ideas?
© Stack Overflow or respective owner