code: public static int nthIndexOf(final String string, final String token,
              final int index)
     {
        int j = 0;
  
        for (int i = 0; i < index; i++)
        {
           j = string.indexOf(token, j + 1);
           if (j == -1)
              break;
        }
  
        return j;
     }
docs: Return the <i>nth</i> index of the given token occurring in the given string.
  
  @param string String to search.
  @param token Token to match.
  @param index <i>Nth</i> index.
  @return Index of <i>nth</i> item or -1.