Problem with std.algorithm.iteration::substitute

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Sat Jan 11 20:09:09 UTC 2020


You can also turn your function into a fold.

auto searches = ["1", "2"];
writeln (searches.fold!((a, b)  => a.substitute(b, 
"number").to!string)("come 1 come 2")) ;




More information about the Digitalmars-d-learn mailing list