remove from array
Chris Nicholson-Sauls
ibisbasenji at gmail.com
Wed Feb 28 16:08:24 PST 2007
Chris Nicholson-Sauls wrote:
>
> Bill Baxter wrote:
>> BCS wrote:
>>> 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 .. $];
>>> }
>>>
>>>
>>
>> This has the function you're looking for and a number of others you'll
>> probably be looking for soon after. :-)
>>
>> http://www.dsource.org/projects/cashew/browser/trunk/cashew/utils/array.d
>>
>> --bb
>
> Hmm, wow, I really need to revisit Cashew... think I'll go do that
> now. :) So much left unfinished and unwritten on there. Bad me. But
> thanks for the promotion. Good to know I'm not the only one who uses it.
>
> -- Chris Nicholson-Sauls
And there is now a new version in SVN (v0.10.4) which has some little cleanups.
-- Chris Nicholson-Sauls
More information about the Digitalmars-d
mailing list