Re: [fpc-pascal] String buffer

2010-02-10 Thread Graeme Geldenhuys
Honza wrote: > > I guess some memory and/or time could be saved in certain usage > patterns compared to TSTringList and String. There is now a dumb > benchmark on the blog, but nobody should trust other's benchmarks :) Thanks. Good news is that it looks consistently faster than both String and St

Re: [fpc-pascal] String buffer

2010-02-10 Thread Marco van de Voort
In our previous episode, Honza said: > > Append+Append+...+Read... > > I agree in all points, even while having some more ideas on the > naming. If it will be considered for FCL, then let the dev team pick > identifiers of their choice and any other changes/improvements - I'll > be happy to implem

Re: [fpc-pascal] String buffer

2010-02-10 Thread Honza
On Tue, 9 Feb 2010 10:45:55 -0300, Fl?vio Etrusco wrote: > Some (hopefully constructive) commentaries (and then I would suggest > to add to LCL or FCL): > 1) It could be called really TStringBuffer; > 2) The 'W' methods could be called 'Append'; > 3) The GetS method could truncate the string to av

Re: [fpc-pascal] String buffer

2010-02-09 Thread Graeme Geldenhuys
Honza wrote: > Probably just reinventing the wheel - I was not able to quickly find a > String builder/buffer elsewhere. Thanks for the contribution. Could you explain what the advantages are of that string buffer object compared to a standard string types like AnsiString or TStringList? Regar

Re: [fpc-pascal] String buffer

2010-02-09 Thread Flávio Etrusco
On Tue, Feb 9, 2010 at 8:50 AM, Honza wrote: > Probably just reinventing the wheel - I was not able to quickly find a > String builder/buffer elsewhere. > > Source code for anyone possible interested is published on a blog (no > ads there, so I hope it's OK to post the link): > > http://freepascal

[fpc-pascal] String buffer

2010-02-09 Thread Honza
Probably just reinventing the wheel - I was not able to quickly find a String builder/buffer elsewhere. Source code for anyone possible interested is published on a blog (no ads there, so I hope it's OK to post the link): http://freepascal-bits.blogspot.com/2010/02/simple-string-buffer.html -bfl