Missing array element

Ali Çehreli via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Aug 29 11:39:03 PDT 2017


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



More information about the Digitalmars-d-learn mailing list