🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #6417

Re: memory stream parsing

#6417
From: Jonathan Benedicto
Date: Mon, 16 May 2005 16:56
16 lines
1655 bytes
"Vladimir Stefanovic" <antivari@po.sbb.co.yu> wrote in message 
news:4288cbbc@newsgroups.borland.com...
>I made some late changes, and now I think that this
> must work:

Not to discount your code, but isn't this a little simpler:

AnsiString Data = AnsiString(Stream->Memory, Stream->Size);

Data = StringReplace(Data, "\r\n", "", TReplaceFlags() << 
rfReplaceAll);

Stream->Clear();
Stream->Write(Data.c_str(), Data.Length());

Jonathan 
Technical Details
Message-ID: <4288d0bd$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.maxwell.syr.edu!border1.nntp.dca.giganews.com!nntp.giganews.com!newshosting.com!nx02.iad01.newshosting.com!diablo.voicenet.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <42878a87$1@newsgroups.borland.com> <4287a0a4$1@newsgroups.borland.com> <4287a37a@newsgroups.borland.com> <428815f8@newsgroups.borland.com> <4288cbbc@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,cb77108e6b3d9403
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Jonathan Benedicto" <incorrect@no.server>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <42878a87$1@newsgroups.borland.com> <4287a0a4$1@newsgroups.borland.com> <4287a37a@newsgroups.borland.com> <428815f8@newsgroups.borland.com> <4288cbbc@newsgroups.borland.com>
Subject: Re: memory stream parsing
Date: Mon, 16 May 2005 12:56:31 -0400
Lines: 18
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 64.231.16.168
Message-ID: <4288d0bd$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1116262589 64.231.16.168 (16 May 2005 09:56:29 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.maxwell.syr.edu!border1.nntp.dca.giganews.com!nntp.giganews.com!newshosting.com!nx02.iad01.newshosting.com!diablo.voicenet.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail