How convert DList!string to string array

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Sat Feb 15 10:24:49 PST 2014


On Saturday, 15 February 2014 at 16:38:42 UTC, Timon Gehr wrote:
> On 02/15/2014 05:30 PM, Denis Mezhov wrote:
>> Please help. How to convert DList!string to string array?
>>
>> auto a = DList!string();
>> a.insertFront("123");
>> a.insertFront("abc");
>>
>> string[] b = a[];
>> Array!string c = a[];
>>
>> Don't work.
>>
>>
>
> auto b = a[].array;
> Array!string c;
> c.insertBack(a[]);

I just wanted to point out:

     auto b = a[].array;

That is unrelated to c, which is a conversion to Array, while 
this is a conversion to an array.


More information about the Digitalmars-d-learn mailing list