I would like to find the indexes of all the elements of an array matching a certain value. I could simply loop over all the elements to do the job, but I was hoping for some ready made function that also works across different types (ints, floats etc...).

I saw the countUntil function in std.algorithm, but that gives me only the index of the first match, while I would like to get an array with the indexes of all the matches. Is there any function for that purpose?

Thanks for any help!

Reply via email to