digitalmars.D.bugs - [Issue 12335] New: std.algorithm.skipOver should support multiple args like startsWith
- d-bugmail puremagic.com (29/29) Mar 10 2014 https://d.puremagic.com/issues/show_bug.cgi?id=12335
- d-bugmail puremagic.com (10/10) Mar 13 2014 https://d.puremagic.com/issues/show_bug.cgi?id=12335
https://d.puremagic.com/issues/show_bug.cgi?id=12335 Summary: std.algorithm.skipOver should support multiple args like startsWith Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: peter.alexander.au gmail.com 01:20:03 PDT --- e.g. string s = "fooey"; assert(skipOver(s, "foo", "bar") == 1 && s == "ey"); s = "fooey"; assert(skipOver(s, "bar", "foo") == 2 && s == "ey"); s = "fooey"; assert(skipOver(s, "far", "for") == 0 && s == "fooey"); If there are multiple overlapping matches, I think it should match the longest one as that preserves the most information, and makes it useful in maximal munch parsers. e.g. string s = "fooey"; assert(skipOver(s, "foo", "fo") == 1); -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 10 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12335 Andrei Alexandrescu <andrei erdani.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrei erdani.com PDT --- *** Issue 12336 has been marked as a duplicate of this issue. *** -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 13 2014