How-to manipulate a C array with D2 vector operations?

Trass3r un at known.com
Mon Feb 28 10:16:09 PST 2011


> I am trying to implement a D2 function that has this C signature (it
> gets called from a C module and I cannot change the caller):
>
> extern(C) read_into(char *buffer, size_t buf_len);
>
> I would like to use D's vector (or array-wise according to TDPL)
> operations on buffer but I cannot find a way, how I could initialize a

auto darray = buffer[0 .. buf_len]


More information about the Digitalmars-d-learn mailing list