is it possible to write a generic .find function for arrays that ignores strings and so doesn't cause conflicts? I think in D2 its easy by putting an if() constraint on the template, but is it possible in D1? like:
int find(T)(T[] array, T obj) { foreach (i, v; array) { if (v == obj) return i; } return -1; } this conflicts with std.string.find, so i have to import one of them statically and use it like. std.string.find("mystr", "s"); i want to be able to just have: int[] arr; arr.find(5); string s; s.find("foo");