[fpc-devel] TStringList.commatext - again

Ales Katona ales at chello.sk
Thu Jun 2 19:33:45 CEST 2005


I'm sending this patch on behalf of my cousin. It seems his mail didn't get
into the mailing list(if it did, I'm sorry for the inconvinience)

-----------------------------------------------------------------------------------------------------------

Hi,

I found some errors in TSringList.CommaText and tryed to fix it. For
variable sl:TStringList, command

sl.CommaText:=sl.CommaText;

sometimes changes strings in the list
- when list contained more then one string and last string was '', previous
command removed last string from the list
- string in a list was not qouted in commatext, if it contained #0 before
first '"' or ',' or ' '
- commatext for empty list was '""', just like for list containing one 
empty
string, so previous command changed empty list into list with one empty
string

I am sending changed rtl\objpas\classes\stringl.inc in attachment. I have
changed methods
Function TStrings.GetDelimitedText: string;
Procedure TStrings.SetDelimitedText(const AValue: string);
and removed
Function GetNextQuotedChar (var P : PChar; Var S : String; Delim,Quote :
Char): Boolean;

changed parts are stil there as coments

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stringl.inc
Type: application/octet-stream
Size: 23372 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20050602/a63469e8/attachment.obj>


More information about the fpc-devel mailing list