February 01, 2002 deleting array element | ||||
---|---|---|---|---|
| ||||
It'd be great to have some operator, or method, or something to delete an element of the dynamic array quickly. Currently this is done like that: array = array[0 .. index] ~ array[index + 1 .. array.length]; But it's quite a lot of typing... something like this is shorter, and just looks better: array.remove(index); -- or -- delete[index] array; |
March 23, 2003 Re: deleting array element | ||||
---|---|---|---|---|
| ||||
Posted in reply to Pavel Minayev | "Pavel Minayev" <evilone@omen.ru> escribió en el mensaje news:a3em3k$24um$1@digitaldaemon.com... | It'd be great to have some operator, or method, or something | to delete an element of the dynamic array quickly. Currently | this is done like that: | | array = array[0 .. index] ~ array[index + 1 .. array.length]; | | But it's quite a lot of typing... something like this | is shorter, and just looks better: | | array.remove(index); | | -- or -- | | delete[index] array; | | This is a great idea! ————————————————————————— Carlos Santander --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.463 / Virus Database: 262 - Release Date: 2003-03-17 |
Copyright © 1999-2021 by the D Language Foundation