readln with buffer fails
ketmar via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Oct 29 14:28:51 PDT 2014
On Wed, 29 Oct 2014 21:14:13 +0000
dcrepid via Digitalmars-d-learn <digitalmars-d-learn at puremagic.com>
wrote:
> Now, I'm used to 'buffer' meaning one thing, but here it seems
> that buffer means something more akin to a 'sink' object, or a
> forced dynamic array type? Is there some way I can avoid dynamic
> allocations?
take a slice of your buffer: `Input[]`. slices aren't doing
allocations, they just keeping pointer to data and data length together.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20141029/17fc6501/attachment.sig>
More information about the Digitalmars-d-learn
mailing list