instr: Position of the nth occurrence of a string in another one
Description
Returns the position of the nth occurrence of str2 in str1. Returns 0 if str2 is not found.
This code was first suggested by Abdelmonem Mahmoud Amer in https://stackoverflow.com/a/33005653/5421090
Usage
instr(str1, str2, startpos = 1, n = 1)
Value
number representing the nth position of str2 in str1