Mercurial > projects > ddmd
comparison dmd/condition/util/findCondition.d @ 0:10317f0c89a5
Initial commit
author | korDen |
---|---|
date | Sat, 24 Oct 2009 08:42:06 +0400 |
parents | |
children | e28b18c23469 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:10317f0c89a5 |
---|---|
1 module dmd.condition.util.findCondition; | |
2 | |
3 import dmd.String; | |
4 import dmd.Array; | |
5 import dmd.Identifier; | |
6 | |
7 bool findCondition(Array ids, Identifier ident) | |
8 { | |
9 if (ids) | |
10 { | |
11 for (int i = 0; i < ids.dim; i++) | |
12 { | |
13 String id = cast(String)ids.data[i]; | |
14 | |
15 if (id.str == ident.toChars()) { | |
16 return true; | |
17 } | |
18 } | |
19 } | |
20 | |
21 return false; | |
22 } |