code: public static int ordinalIndexOf(String str, String searchStr, int ordinal) {
        if (str == null || searchStr == null || ordinal <= 0) {
            return INDEX_NOT_FOUND;
        }
        if (searchStr.length() == 0) {
            return 0;
        }
        int found = 0;
        int index = INDEX_NOT_FOUND;
        do {
            index = str.indexOf(searchStr, index + 1);
            if (index < 0) {
                return index;
            }
            found++;
        } while (found < ordinal);
        return index;
    }
docs: <p>Finds the n-th index within a String, handling <code>null</code>.
  This method uses {@link String#indexOf(String)}.</p>
  
  <p>A <code>null</code> String will return <code>-1</code>.</p>
  
  <pre>
  GosuStringUtil.ordinalIndexOf(null, *, *)          = -1
  GosuStringUtil.ordinalIndexOf(*, null, *)          = -1
  GosuStringUtil.ordinalIndexOf("", "", *)           = 0
  GosuStringUtil.ordinalIndexOf("aabaabaa", "a", 1)  = 0
  GosuStringUtil.ordinalIndexOf("aabaabaa", "a", 2)  = 1
  GosuStringUtil.ordinalIndexOf("aabaabaa", "b", 1)  = 2
  GosuStringUtil.ordinalIndexOf("aabaabaa", "b", 2)  = 5
  GosuStringUtil.ordinalIndexOf("aabaabaa", "ab", 1) = 1
  GosuStringUtil.ordinalIndexOf("aabaabaa", "ab", 2) = 4
  GosuStringUtil.ordinalIndexOf("aabaabaa", "", 1)   = 0
  GosuStringUtil.ordinalIndexOf("aabaabaa", "", 2)   = 0
  </pre>
  
  @param str  the String to check, may be null
  @param searchStr  the String to find, may be null
  @param ordinal  the n-th <code>searchStr</code> to find
  @return the n-th index of the search String,
  <code>-1</code> (<code>INDEX_NOT_FOUND</code>) if no match or <code>null</code> string input
  @since 2.1