[fpc-pascal] Is there a bug in TStrings.Delimiter handling?

Marco van de Voort marcov at stack.nl
Mon Nov 21 09:20:39 CET 2011


In our previous episode, Frank Church said:
> adapterVals: TStringList
> 
> adapterVals.Delimiter := ';';
> adapterVals.DelimitedText := '192.168.1.2,00:0E:08:E0:7C:ED,Word Space';
> adapterVals[0] = '192.168.1.2'
> adapterVals[1] = '00:0E:08:E0:7C:ED'
> adapterVals[2] = 'Word' - this should be 'Word Space'
> 
> Is this a bug or the expected output? If the delimiter is set to a comma it
> shouldn't treat a space as a delimter as well.

This is the expected output and delphi compatible.

Hint: set adapterVals.strictdelimiter:=true



More information about the fpc-pascal mailing list