Add indexes-of function to the string namespace

I couldn't find an existing equivalent to this function and this would seem like a sensible place for it.