// IndexN returns the nth occurrences of sep in s or -1 if there is no nth
// occurrence of sep.
IndexN returns the nth occurrences of sep in s or -1 if there is no nth
occurrence of sep.
// IndexN returns the nth occurrences of sep in s or - 1 if there is no nth // occurrence of sep .
func IndexN(s, sep string, n int) int {
	sepIdx := 0
	for i := 0; i < n; i++ {
		nextIdx := strings.Index(s[sepIdx:], sep)
		if nextIdx == -1 {
			return -1 
		}
		sepIdx += nextIdx + 1
	}
	return sepIdx - 1
}
func IndexN ( s , sep string , n int ) int { sepIdx := 0 for i := 0 ; i < n ; i ++ { nextIdx := strings . Index ( s [ sepIdx : ] , sep ) if nextIdx == - 1 { return - 1 } sepIdx += nextIdx + 1 } return sepIdx - 1 }
IndexN returns the nth occurrences of sep in s or -1 if there is no nth
occurrence of sep.
IndexN returns the nth occurrences of sep in s or - 1 if there is no nth occurrence of sep .
// ### return, not found ###