Re: What should be reterned by std.array.replaceFirst

2011-08-02 Thread zhang
> On Sat, 30 Jul 2011 07:29:54 +0800, zhang wrote: > > > I tested std.array.replaceFirst with the code belown: > > > > string s1 = "abc bcf"; > > > > string s2 = s1.replaceFirst("bc", "ee"); writefln("%s\n%s", s1, s2); > > > > and got s2 is "aee". Should it be "aee bcf"? > > > > Is it

Re: What should be reterned by std.array.replaceFirst

2011-08-01 Thread Jesse Phillips
On Sat, 30 Jul 2011 07:29:54 +0800, zhang wrote: > I tested std.array.replaceFirst with the code belown: > > string s1 = "abc bcf"; > > string s2 = s1.replaceFirst("bc", "ee"); writefln("%s\n%s", s1, s2); > > and got s2 is "aee". Should it be "aee bcf"? > > Is it a bug, or just it is t

What should be reterned by std.array.replaceFirst

2011-07-29 Thread zhang
I tested std.array.replaceFirst with the code belown: string s1 = "abc bcf"; string s2 = s1.replaceFirst("bc", "ee"); writefln("%s\n%s", s1, s2); and got s2 is "aee". Should it be "aee bcf"? Is it a bug, or just it is that? Thanks. -- Zhang