In expression for array

kede nobody at gmail.com
Wed Jan 23 20:38:21 PST 2008


Hi All,

How about adding In expressions for general arrays in addition to assoc arrays:

 if ('i' in eyes)
 ...

as a simple replacement for the more verbose
 foreach(c; eyes)
   if (c == 'i')
     ...

I think its a common enough pattern to warrant inclusion?

Have fun,
kede



More information about the Digitalmars-d mailing list