Thread overview | ||||||
---|---|---|---|---|---|---|
|
August 02, 2011 [Issue 6428] New: Inconsistent implement in std.array.replaceFirst | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=6428 Summary: Inconsistent implement in std.array.replaceFirst Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody@puremagic.com ReportedBy: bitworld@qq.com --- Comment #0 from Heromyth <bitworld@qq.com> 2011-08-02 06:55:12 PDT --- Test code: string s1 = "abc bcf"; string s2 = s1.replaceFirst("bc", "ee"); writefln("%s\n%s", s1, s2); The s2 should be "aee bcf", however the result of replaceFirst is "aee". -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 02, 2011 [Issue 6428] Inconsistent implement in std.array.replaceFirst | ||||
---|---|---|---|---|
| ||||
Posted in reply to Heromyth | http://d.puremagic.com/issues/show_bug.cgi?id=6428 --- Comment #1 from Heromyth <bitworld@qq.com> 2011-08-02 07:01:13 PDT --- I have a patch: --- array.d Sun Jul 10 13:19:30 2011 +++ array-new.d Tue Aug 02 21:58:12 2011 @@ -1522,7 +1522,7 @@ auto app = appender!R1(); app.put(subject[0 .. subject.length - balance.length]); app.put(to.save); - subject = balance[from.length .. $]; + app.put(balance[from.length .. $]); return app.data; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 02, 2011 [Issue 6428] Inconsistent implement in std.array.replaceFirst | ||||
---|---|---|---|---|
| ||||
Posted in reply to Heromyth | http://d.puremagic.com/issues/show_bug.cgi?id=6428 klickverbot <code@klickverbot.at> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |code@klickverbot.at --- Comment #2 from klickverbot <code@klickverbot.at> 2011-08-02 09:09:19 PDT --- https://github.com/D-Programming-Language/phobos/pull/168 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 22, 2011 [Issue 6428] Inconsistent implement in std.array.replaceFirst | ||||
---|---|---|---|---|
| ||||
Posted in reply to Heromyth | http://d.puremagic.com/issues/show_bug.cgi?id=6428 klickverbot <code@klickverbot.at> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation