array function

cym13 via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Aug 31 06:17:28 PDT 2015


On Monday, 31 August 2015 at 13:00:49 UTC, Namal wrote:
> Hey guys, since I am learning D arrays here, can you tell me 
> the best way to remove an element at the end of an array or at 
> some index i?

import std.algorithm;

T[] arr;
arr = arr.remove(index);

http://p0nce.github.io/d-idioms/#Adding-or-removing-an-element-from-arrays


More information about the Digitalmars-d-learn mailing list