Simplest way to create an array from an associative array which its contains keys and values?

Andrej Mitrovic andrej.mitrovich at gmail.com
Fri Jan 3 09:50:52 PST 2014


On Friday, 3 January 2014 at 17:47:43 UTC, bearophile wrote:
>     string[] r = aa.byKey.map!(k => [k, aa[k]]).join;

However the [k, aa[k]] expression will allocate an array for each 
key you iterate over regardless if you use join or joiner. I 
posted a solution with "only", hope that works. :)


More information about the Digitalmars-d-learn mailing list