digitalmars.D.bugs - [Issue 4764] New: Lazy versions of std.string.split and std.string.splitlines
- d-bugmail puremagic.com (29/29) Aug 29 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4764
- d-bugmail puremagic.com (7/7) Jun 26 2011 http://d.puremagic.com/issues/show_bug.cgi?id=4764
http://d.puremagic.com/issues/show_bug.cgi?id=4764 Summary: Lazy versions of std.string.split and std.string.splitlines Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: bearophile_hugs eml.cc If you have a very large string that you need to split into its lines or parts lazily, you waste some memory if you use std.string.split or std.string.splitlines. So I suggest to add to std.string two ranges that work like std.string.split or std.string.splitlines but are lazy like std.algorithm.splitter(). std.algorithm.splitter() can't be used directly for this purpose because the semantic of std.string.split and std.string.splitlines is string-specific, they use three different kinds of newlines, and several different kinds of newspace (but the two new string functions may call std.algorithm.splitter() internally to reduce code duplication). The two new functions may be named for example std.string.lazySplit and std.string.lazySplitlines. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Aug 29 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4764 Now there is std.algorithm.splitter, that's lazy. There isn't a lazy splitlines yet. See also bug 5977 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 26 2011