Declaration: NumberedPos (SubStr, MainStr: string; StartIx, Count: integer; IgnoreCase : boolean): integer;

The function NumberedPos returns the position of the Count'th occurrence of the substring SubStr in the string MainStr. The parameter StartIx specifies the position of the MainStr where the search is to be started. The search is not case sensitive if IgnoreCase is set to a TRUE value. The parameter Count defines the number of required occurrences of the substring. If no substring can be found under the specified conditions, the function returns a zero value.