LFIND() searches for a substring within another string and returns the character index of the specified occurrence, starting from the left side. If no occurrence number is specified, it returns the first occurrence. If the search string is not found or the specified occurrence exceeds the number of occurrences, LFIND() returns zero. Note that LFIND() is an alias for INSTR().
LFIND(string, search string [, occurrence])
LFIND() returns an integer
LFIND("Green apples taste better than red apples and all other types of apples.", "apples") = 7
(first occurrence of "apples")
LFIND("Green apples taste better than red apples and all other types of apples.", "oranges") = 0
(search string not found)
LFIND("Green apples taste better than red apples and all other types of apples.", "apples", 1) = 7
(first occurrence)
LFIND("Green apples taste better than red apples and all other types of apples.", "apples", 2) = 36
(second occurrence)
LFIND("Green apples taste better than red apples and all other types of apples.", "apples", 3) = 66
(third occurrence)
LFIND("Green apples taste better than red apples and all other types of apples.", "apples", 4) = 0
(no fourth occurrence)
LFIND("Hello World", "o") = 5
(first occurrence of single character)
LFIND("", "test") = 0
(empty string)
LFIND(NULL, "test") = NULL
(NULL input)