digitalmars.D - std.array replaceFirst
- Steve Teale <steve.teale britseyeview.com> Aug 22 2011
- David Nadlinger <see klickverbot.at> Aug 22 2011
import std.stdio;
import std.array;
void main()
{
string s = "the slow - very slow - brown fox";
string rf = replaceFirst(s, "slow", "quick");
writeln(rf); // prints "the quick"
string r = replace(s, "slow", "quick");
writeln(r); // prints "the quick - very quick - brown fox"
}
Is this as intended? (version 2.054)
Aug 22 2011
On 8/22/11 9:35 AM, Steve Teale wrote:import std.stdio; import std.array; void main() { string s = "the slow - very slow - brown fox"; string rf = replaceFirst(s, "slow", "quick"); writeln(rf); // prints "the quick" string r = replace(s, "slow", "quick"); writeln(r); // prints "the quick - very quick - brown fox" } Is this as intended? (version 2.054)
This has already been fixed in Git master: http://d.puremagic.com/issues/show_bug.cgi?id=6428 David
Aug 22 2011








David Nadlinger <see klickverbot.at>