Hi all, sorry for the very simple question, but I'm looking at the "among" function in std.comparison:

https://dlang.org/phobos/std_algorithm_comparison.html#among

If I have a string array:

string[] fruit = ["apple", "pear", "strawberry"];

How do I use "among" to see if "apple" is present. E.g. I want to do this:

if ("apple".among(fruit))

However that wont compile - I'm missing something fundamental in my knowledge.

It seems fruit has to be a Tuple? Is there a way to use a string array instead?

Reply via email to