std.container.rbtree has no search method?! e.g. `contains`, `canFind`

Dennis dkorpel at gmail.com
Sat Jul 13 18:45:37 UTC 2024


On Saturday, 13 July 2024 at 17:41:42 UTC, mw wrote:
> I cannot find any search method?! e.g. `contains`, `canFind`.
>
> Is this a over look? Or there are such functions else where?

It's the `in` operator:

https://dlang.org/phobos/std_container_rbtree.html#.RedBlackTree.opBinaryRight

But indeed, the documentation can be clearer about that.


More information about the Digitalmars-d-learn mailing list