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: nob...@puremagic.com ReportedBy: peter.alexander...@gmail.com --- Comment #0 from Peter Alexander <peter.alexander...@gmail.com> 2014-03-10 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: -------