generic indexOf() for arrays ?
M.Gore
mgoremeier at googlemail.com
Fri Apr 27 12:49:32 PDT 2012
I'd like to know if there's a generic function over arrays to
find the index of a specific elemnt therein, something like, say:
int indexOf(S) (in S[] arr, S elem);
which works the same way the std.string.indexOf() function
works... couldn't find anything in the std.array module for this
scenario. Would be nice to have this functionality built-in
somehow.
Or is there a completely different / better approach to this in D?
Thx, M.
More information about the Digitalmars-d
mailing list