[Issue 5201] New: std.string.indexOf and std.algorithm.indexOf return different things for narrow strings
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Nov 11 10:57:53 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5201
Summary: std.string.indexOf and std.algorithm.indexOf return
different things for narrow strings
Product: D
Version: D2
Platform: Other
OS/Version: Mac OS X
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: andrei at metalanguage.com
--- Comment #0 from Andrei Alexandrescu <andrei at metalanguage.com> 2010-11-11 10:56:43 PST ---
std.algorithm.indexOf returns logical position because it uses the forward
range interface, and std.string.indexOf returns the physical position.
This is potentially confusing (the semantics of a program depends on its
imports).
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list