How about a function called contains() for the module std.array?

Adam D. Ruppe destructionator at
Sat Oct 19 21:58:55 UTC 2019

On Saturday, 19 October 2019 at 21:47:57 UTC, Murilo wrote:
> I did not find such function

It is called `canFind`

import std.algorithm.searching;
import std.stdio;

void main() {
         bool f = [1,2,3,4,5,6].canFind([3,5,6]);

More information about the Digitalmars-d mailing list