mixing array and string .find()
Denis Koroskin
2korden at gmail.com
Mon Mar 23 18:11:46 PDT 2009
Try the following:
int find(T)(T[] array, T obj) if (!is(T : char))
{
foreach (i, v; array) {
if (v == obj)
return i;
}
return -1;
}
More information about the Digitalmars-d-learn
mailing list