Re: canFind all elements in a array.

2020-11-10 Thread Vino via Digitalmars-d-learn
On Tuesday, 10 November 2020 at 09:47:06 UTC, sarn wrote: On Tuesday, 10 November 2020 at 08:19:15 UTC, Vino wrote: [...] This is iterating over all the elements in data2 and outputting some of them, so the output will never be longer than data2. [...] Hi Sarn, Thank you very much

Re: canFind all elements in a array.

2020-11-10 Thread sarn via Digitalmars-d-learn
On Tuesday, 10 November 2020 at 08:19:15 UTC, Vino wrote: foreach(i; data2[]) { if(data1[].canFind(i[0])) { writeln(i[1]); } } This is iterating over all the elements in data2 and outputting some of them, so the output will never be longer than data2. It looks like you want to iter