function nthIndex( str, searchValue, n ) {
	var len = str.length;
	var i = -1;
	while ( n > 0 && i < len ) {
		i += 1;
		i = str.indexOf( searchValue, i );
		if ( i < 0 ) {
			break;
		}
		n -= 1;
	}
	return i;
}
Returns the n-th index of the given search value in a string.

@private
@param {string} str - input string
@param {string} searchValue - value to search for
@param {number} n - index of which match to return
@returns {number} n-th index