I don't work for dotNet. I use Delphi 7.

I never worked with really long strings and Borland's help didn't tell anything 
about the optimum
way of building strings.
I should use 'Concat' or there are other string functions specialized in 
building strings?



--- Bob Swart <[EMAIL PROTECTED]> wrote:

> Hi Human,
> 
> > Strings in Delphi should be able to store 2GB, right?
> 
> Limited by the amount of virtual memory, at least.
> 
> > var Raport: string;
> > procedure TFrmHTML.AddLine(s: String);
> > begin
> >  Raport:= Raport+ CRLF+ '<br>'+ s;
> > end;
> 
> This is not the way to build long strings, and will lead to memory 
> problems. For every string addition, a new string is allocated with the 
> old value plus the new addition.
> 
> Are you building a .NET application? Then check out the StringBuilder 
> which should be used in this case.
> 
> Groetjes,
>            Bob Swart
> 
> -- 
> Bob Swart Training & Consultancy (eBob42.com)  Forever Loyal to Delphi
> Blog: http://www.drbob42.com/blog - RSS: http://drbob42.com/weblog.xml
> __________________________________________________
> Delphi-Talk mailing list -> [email protected]
> http://www.elists.org/mailman/listinfo/delphi-talk
> 


...and the traveler died, stroked by the beauty of the landscape.

THE MORNING OF THE MAGICIANS
Louis Pawels & Jacques Bergier

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi-talk

Reply via email to