[fpc-pascal] Is there a bug in TStrings.Delimiter handling?
michael.vancanneyt at wisa.be
michael.vancanneyt at wisa.be
Mon Nov 21 09:31:57 CET 2011
On Mon, 21 Nov 2011, michael.vancanneyt at wisa.be wrote:
>
>
> On Mon, 21 Nov 2011, Frank Church wrote:
>
>> 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.
>
> A space is always treated special.
>
> You should either enclose values with spaces in quotes, or set the
> StrinctDelimiter property to true, in which case the space loses its special
> meaning.
Typo, should be StrictDelimiter, of course.
Michael.
More information about the fpc-pascal
mailing list