[fpc-pascal] String buffer

Flávio Etrusco flavio.etrusco at gmail.com
Tue Feb 9 14:45:55 CET 2010

On Tue, Feb 9, 2010 at 8:50 AM, Honza <befelemepeseveze at gmail.com> 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-bits.blogspot.com/2010/02/simple-string-buffer.html
> -bflm

I guess ads wouldn't be a problem anyway ;-)
I find a class like this very useful (for some tasks), thanks! This
has been suggested on the list a couple of times and I even intended
to implement something but didn't have the need since.
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 avoid the copy, as I
think the common use will not be Append+Read+Append+Read, but

Best regards,

More information about the fpc-pascal mailing list