Re: Convert array of tuples into array of arrays.

2022-09-01 Thread Salih Dincer via Digitalmars-d-learn
On Wednesday, 31 August 2022 at 17:26:56 UTC, Ali Çehreli wrote: [...] You can make an array of arrays from those with the following syntax: auto arrayOfArrays = [ keys, values ]; Then I wrote a more general program after this first one: I really like the generic methods. Because we can us

Re: Convert array of tuples into array of arrays.

2022-08-31 Thread Ali Çehreli via Digitalmars-d-learn
On 8/31/22 07:34, musculus wrote: > Hi. I have an array of tuples that I would like to convert to an array > of arrays. I misunderstood as well and wrote the following program which makes separate arrays. You can make an array of arrays from those with the following syntax: auto arrayOfArra

Re: Convert array of tuples into array of arrays.

2022-08-31 Thread Nick Treleaven via Digitalmars-d-learn
On Wednesday, 31 August 2022 at 14:34:50 UTC, musculus wrote: Hi. I have an array of tuples that I would like to convert to an array of arrays. All of the elements in the tuples have matching types (string). How would I go about doing this? Thanks! Assuming std.typecons.Tuple, you can use `[tu

Convert array of tuples into array of arrays.

2022-08-31 Thread musculus via Digitalmars-d-learn
Hi. I have an array of tuples that I would like to convert to an array of arrays. All of the elements in the tuples have matching types (string). How would I go about doing this? Thanks!