Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2009-06

stringlist.commatext breaks at space?

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin

Is this intention? (fpc 224)

Fstringlist.CommaText = 'a b,c';
gives three strings, because the comma serves as separator too?

rtl\objpas\classes\stringl.inc line 314

       while (j<=length(AValue)) and
             (Ord(AValue[j])>Ord(' ')) and  // <=== this here
             (AValue[j]FDelimiter) do inc(j);

should that be >= ?

Martin

Reply by email

Michael Van Canneyt
to Martin
Martin wrote
Is this intention? (fpc 224) Fstringlist.CommaText = 'a b,c'; gives three strings, because the comma serves as separator too?

Of course, why else is it called commatext ?

The 'strange' one is the space.
You can disable the use of the space as a separator by setting 'Strictdelimiters' to True.

Michael.

Reply by email