Find the position of the nth occurrence of a substring in a string

We are looking for the position of the given substring in the string, indicating what count the found pattern should be, if it occurs several times in the string. The function is case sensitive.


sourceString - the string in which we are looking

findStr - the substring we are looking for


The position of the desired substring if the specified parameters match. Or (0) if the specified occurrence number does not exist or the substring was not found at all.

Author: admin