http://d.puremagic.com/issues/show_bug.cgi?id=10773
Summary: std.algorithm.splitter produces infinite range with
empty delimiter
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from [email protected] 2013-08-07 13:15:56 PDT ---
Calling std.algorithm.splitter with a non-empty string and an empty delimiter
causes it to produce an infinite range of empty strings. This, in turn, causes
std.array.split to get into an infinite loop when it is called with an empty
delimiter.
When the delimiter is empty, std.algorithm.splitter should return a range
containing 1-element ranges of each element in the original range. (Cf. Perl's
split(//, "string").) At the very least, std.array.split should not have an
infinite loop.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------