[Issue 10930] std.array.replace cannot simple replace an element in array

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Aug 31 02:46:55 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=10930

RazvanN <razvan.nitu1305 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1305 at gmail.com

--- Comment #3 from RazvanN <razvan.nitu1305 at gmail.com> ---
This should do the trick:

    auto arr = [ 1, 1, 1 ];
    arr = replace(arr, 1, 2);

    writeln(arr);

I suggest we close this.

--


More information about the Digitalmars-d-bugs mailing list