Searches one character string for another character string.


InStr ( str1,str2[,start_at[,occurrence]])


str1 is the string to search,

str2 is the string to search for,

start_at is an integer indicating the (one-based) position in str1 to begin searching, and

occurrence is the integer indicating the occurrence of str2 to locate in str1.


Returns the (one-based) position in str1 that is the first character of the desired occurrence of str2. If the desired occurrence of str2 is not found, or if str1 or str2 is NULL, 0 is returned. The parameters start_at and occurrence are optional and default to 1 and 1, respectively.