replace an element in
array
https://github.com/dlang/phobos/commit/ce6d6cadb728a656749e8b0a04b2c5ac88b50c80
Merge pull request #6022 from wilzbach/fix-10930
Fix Issue 10930 - std.array.replace cannot simple replace an element in array
--
https://issues.dlang.org/show_bug.cgi?id=10930
github-bugzi...@puremagic.com changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=10930
Seb changed:
What|Removed |Added
Keywords||pull
--- Comment #8 from Seb
https://issues.dlang.org/show_bug.cgi?id=10930
Seb changed:
What|Removed |Added
CC||greensunn...@gmail.com
---
https://issues.dlang.org/show_bug.cgi?id=10930
--- Comment #6 from Temtaime ---
I don't see a reason why single element cannot be replaced
For example, both this examples works:
[1, 2].split([1]);
[1, 2].split(1);
--
https://issues.dlang.org/show_bug.cgi?id=10930
ZombineDev changed:
What|Removed |Added
CC|
https://issues.dlang.org/show_bug.cgi?id=10930
--- Comment #4 from RazvanN ---
This should do the trick:
auto arr = [ 1, 1, 1 ];
replaceInPlace(arr, 1, 2, [2]);
writeln(arr);
I suggest we close this.
Sorry for the above comment. It was a
https://issues.dlang.org/show_bug.cgi?id=10930
RazvanN changed:
What|Removed |Added
CC|
https://issues.dlang.org/show_bug.cgi?id=10930
safety0ff.bugz safety0ff.b...@gmail.com changed:
What|Removed |Added
CC|
https://issues.dlang.org/show_bug.cgi?id=10930
--- Comment #2 from safety0ff.bugz safety0ff.b...@gmail.com ---
Also, replaceInPlace and replaceSlice are better candidates for this type of
operation.
--
10 matches
Mail list logo