Re: Missing array element

2017-08-30 Thread Biotronic via Digitalmars-d-learn
On Wednesday, 30 August 2017 at 06:16:16 UTC, Vino.B wrote: On Tuesday, 29 August 2017 at 18:39:03 UTC, Ali Çehreli wrote: https://dlang.org/phobos/std_algorithm_setops.html#.setDifference I tried the setDifference but does seem to be working as expected From the documentation of

Re: Missing array element

2017-08-30 Thread Vino.B via Digitalmars-d-learn
On Tuesday, 29 August 2017 at 18:39:03 UTC, Ali Çehreli wrote: On 08/29/2017 11:20 AM, Vino.B wrote: string[] a = ["test1", "test2", "test4"]; string[] b = ["test2", "test4"]; Required output: "test1" You're looking for setDifference:

Re: Missing array element

2017-08-29 Thread Ali Çehreli via Digitalmars-d-learn
On 08/29/2017 11:20 AM, Vino.B wrote: string[] a = ["test1", "test2", "test4"]; string[] b = ["test2", "test4"]; Required output: "test1" You're looking for setDifference: https://dlang.org/phobos/std_algorithm_setops.html#.setDifference Ali

Re: Missing array element

2017-08-29 Thread Francis Nixon via Digitalmars-d-learn
On Tuesday, 29 August 2017 at 18:20:38 UTC, Vino.B wrote: Hi, Can any one help me on the below program, as I need the missing element for array "a" to be printed when compared with array "b" Program: import std.stdio, std.array, std.algorithm; string[] a = ["test1", "test2", "test4"];

Missing array element

2017-08-29 Thread Vino.B via Digitalmars-d-learn
Hi, Can any one help me on the below program, as I need the missing element for array "a" to be printed when compared with array "b" Program: import std.stdio, std.array, std.algorithm; string[] a = ["test1", "test2", "test4"]; string[] b = ["test2", "test4"]; void main () { auto m =