[Lazarus] TStringList : how should it behave on Delimiter = ' ' ?

Hans-Peter Diettrich DrDiettrich1 at aol.com
Wed Sep 8 20:28:25 CEST 2010

Lukasz Sokol schrieb:

> I know this is possibly a corner case, when Delimiter = ' ';  but
> there seems something wrong with the logic in SetDelimitedText... ?

That was my opinion as well, when I had a look at the code some time 
ago. Either we copy the Delphi code, for compatibility, or we provide 
our own exact (and meaningful) definition of the behaviour.

Your code looks good to me (snipped it for lost formatting). But there 
may exist another corner case, when the quoted text contains line 
breaks. IMO these should be treated as part of the quoted string, i.e. 
quote chars should have precedence over *all* other characters. This may 
require special code, when otherwise the text is processed line-by-line.

Alternatively we could use an enumerated type for the parse mode, so 
that more than only StrictDelimiter=True/False can be distinguished.


More information about the Lazarus mailing list