remove from array

BCS ao at pathlink.com
Tue Feb 27 15:32:10 PST 2007


Reply to Thorsten,

> How can I remove values from an array ?
> 

<totaly untested code>

T[] Remove(T)(T[] arr, int i)
{
   return i==arr.length-1 ? arr[0..$-1] : arr[0..i] ~ arr[i+1 .. $];
}





More information about the Digitalmars-d mailing list