array.remove(int), similar to aa.remove(key)
Chris Nicholson-Sauls
ibisbasenji at gmail.com
Thu May 25 00:38:06 PDT 2006
Lionello Lunesu wrote:
> array.remove(int) could simply replace [i] with [$-1] and decrement the
> length.
>
> I need this quite a lot and it gets tiresome writing the same 'for' over
> and over. Furthermore, like I've mentioned in the title: since AA's have
> it, it makes sense to add it to normal arrays as well.
>
> L.
I ended up moving all my personal "always copy-pasted template functions" into my personal
library (Cashew) so I didn't have to paste them into anything anymore. ;) Might consider
doing the same. If Cashew's ArrayUtils module suits you, I can just post it for you.
Interface doc'd at:
http://www.codemeu.com:81/~pontiff/projects/cashew/docs/ArrayUtils.html
Code at:
http://www.codemeu.com:81/~pontiff/projects/cashew/cashew.zip
-- Chris Nicholson-Sauls
More information about the Digitalmars-d
mailing list