On 02/25/2011 08:55 PM, Andrej Mitrovic wrote:
On 2/25/11, spir<[email protected]>  wrote:
* delete an element in an associative array

Just use .remove?

void main()
{
     auto var = ["a" : 1];
     var.remove("b");    // nothing happens
     var.remove("a");    // "a" key is gone

     assert(!var.length);  // empty
}

Sh*t, I have missed it. Sorry for the no*se. But where is this func implemented? I could not find it by browsing. (It's also not in object.d, apparently; while usually when I cannot find something, it's hidden in there ;-)

Denis
--
_________________
vita es estrany
spir.wikidot.com

Reply via email to