digitalmars.D.learn - multi compare
- Hussien (6/6) Mar 16 2017 Instead of
- Adam D. Ruppe (4/5) Mar 16 2017 import std.algorithm.comparison;
- Hussien (2/7) Mar 16 2017 thanks
Instead of if (x == a || x == b || x = c || ....) is there an easier way stuff like if (x in [a,b,c,..]) doesn't work.
Mar 16 2017
On Friday, 17 March 2017 at 00:39:15 UTC, Hussien wrote:if (x in [a,b,c,..])import std.algorithm.comparison; x.among(a, b, c); http://dpldocs.info/experimental-docs/std.algorithm.comparison.among.1.html
Mar 16 2017
On Friday, 17 March 2017 at 01:27:01 UTC, Adam D. Ruppe wrote:On Friday, 17 March 2017 at 00:39:15 UTC, Hussien wrote:thanksif (x in [a,b,c,..])import std.algorithm.comparison; x.among(a, b, c); http://dpldocs.info/experimental-docs/std.algorithm.comparison.among.1.html
Mar 16 2017