[fpc-pascal] String conversions

Ryan Joseph genericptr at gmail.com
Tue Jun 25 21:58:35 CEST 2019



> On Jun 25, 2019, at 3:55 PM, Marco van de Voort <fpc at pascalprogramming.org> wrote:
> 
> An exponential growing function applied to all strings would have many worse case behaviours, where it would eat up heaps of memory for nothing. This is why it is better to have the programmer indicate it is a growing string some how (or have a separate type, like TStringBuilder mentioned by Jonas)

It would be nice if ansistring had a SetCapacity function to accompany SetLength but in leu of that I think making a new type is the best idea.

Regards,
	Ryan Joseph



More information about the fpc-pascal mailing list