www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18328] New: algorithm.startsWith can compare narrow string

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

          Issue ID: 18328
           Summary: algorithm.startsWith can compare narrow string lengths
                    in more circumstances
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: trivial
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: n8sh.secondary hotmail.com

algorithm.startsWith can check `haystack.length < needle.length` in more
circumstances than it currently does when one or both of haystack/needle are
narrow strings.

--
Jan 29 2018