← Back to index
|
Original Bugzilla link
Bug 4807 – Examples for std.array insert and replace
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2010-09-03T17:37:00Z
Last change time
2011-02-14T05:48:20Z
Assigned to
bugzilla
Creator
andrej.mitrovich
Comments
Comment #0
by andrej.mitrovich — 2010-09-03T17:37:02Z
These two are missing examples, might add these:
http://www.digitalmars.com/d/2.0/phobos/std_array.html#insert
int[] a = [ 1, 2, 3, 4 ]; a.insert(2, [ 1, 2 ]); assert(a == [ 1, 2, 1, 2, 3, 4 ]);
http://www.digitalmars.com/d/2.0/phobos/std_array.html#replace
int[] a = [ 1, 2, 3, 4 ]; a.replace(1, 3, [ 2, 2 ]); assert(a == [ 1, 2, 2, 4 ]);
Comment #1
by bugzilla — 2011-02-14T05:48:20Z
https://github.com/D-Programming-Language/phobos/commit/00e78b8dd24f37589b0121831c8e19011425bb77