isExist in associate array

Ellery Newcomer ellery-newcomer at utulsa.edu
Tue Dec 9 20:28:33 PST 2008


raymond wrote:
> how to check if array key exist in array or not? for example
> 
> 	char[] [char[]] t;
> 	t["tes1"]="val1";
> 	t["tes2"]="val2";
> 	t["tes3"]="val3";
> 
> 	if (t["test1"]) writefln("NONE");

if("test1" in t) writefln("exists");


More information about the Digitalmars-d-learn mailing list