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)

Reply via email to