Re: Is there a way to clear an OutBuffer?

2016-05-25 Thread Jon Degenhardt via Digitalmars-d-learn
On Wednesday, 25 May 2016 at 19:42:43 UTC, Gary Willoughby wrote: On Monday, 23 May 2016 at 03:03:12 UTC, Jon Degenhardt wrote: Currently not possible. Enhancement request perhaps? Looking at the implementation, setting its 'offset' member seems to work. Based on example from documentation:

Re: Is there a way to clear an OutBuffer?

2016-05-25 Thread Gary Willoughby via Digitalmars-d-learn
On Monday, 23 May 2016 at 03:03:12 UTC, Jon Degenhardt wrote: Currently not possible. Enhancement request perhaps? Looking at the implementation, setting its 'offset' member seems to work. Based on example from documentation: import std.outbuffer; void main() { OutBuffer b = new

Re: Is there a way to clear an OutBuffer?

2016-05-23 Thread Seb via Digitalmars-d-learn
On Monday, 23 May 2016 at 03:03:12 UTC, Jon Degenhardt wrote: On Sunday, 22 May 2016 at 23:01:07 UTC, Ali Çehreli wrote: On 05/22/2016 11:59 AM, Jon Degenhardt wrote: [...] Currently not possible. Enhancement request perhaps? Looking at the implementation, setting its 'offset' member seems

Re: Is there a way to clear an OutBuffer?

2016-05-22 Thread Jon Degenhardt via Digitalmars-d-learn
On Sunday, 22 May 2016 at 23:01:07 UTC, Ali Çehreli wrote: On 05/22/2016 11:59 AM, Jon Degenhardt wrote: Is there a way to clear an OutBuffer, but without freeing the internally managed buffer? Something similar to std.array.appender.clear method. Intent would be to reuse the OutBuffer

Re: Is there a way to clear an OutBuffer?

2016-05-22 Thread Ali Çehreli via Digitalmars-d-learn
On 05/22/2016 11:59 AM, Jon Degenhardt wrote: Is there a way to clear an OutBuffer, but without freeing the internally managed buffer? Something similar to std.array.appender.clear method. Intent would be to reuse the OutBuffer, but without reallocating memory for the buffer. --Jon Currently

Is there a way to clear an OutBuffer?

2016-05-22 Thread Jon Degenhardt via Digitalmars-d-learn
Is there a way to clear an OutBuffer, but without freeing the internally managed buffer? Something similar to std.array.appender.clear method. Intent would be to reuse the OutBuffer, but without reallocating memory for the buffer. --Jon