www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21615] New: indexOf for arrays

https://issues.dlang.org/show_bug.cgi?id=21615

          Issue ID: 21615
           Summary: indexOf for arrays
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: rumbu rumbu.ro

Please add a classic indexOf function in std.algorithm.searching.

Usage of countUntil is not obvious.

For reference: 

C++ find

Java indexOf
Python index
Rust position

--
Feb 06