The $FIND function returns an integer character position that locates the occurrence of a substring within a string.
The format for the $FIND function is:
$F[IND](expr1,expr2[,intexpr])
The first expression specifies the string in which $FIND() searches for the substring.
The second expression specifies the substring for which $FIND() searches.
The optional integer expression identifies the starting position for the $FIND() search. If this argument is missing, zero (0), or negative, $FIND() begins its search in the first position of the string.
If $FIND() locates the substring, it returns the position after the last character of the substring. If the end of the substring coincides with the end of the string (expr1), it returns an integer equal to the length of the string plus one ($L(expr1)+1).
If $FIND() does not locate the substring, it returns zero (0).
$FIND() provides a tool to locate characters. The ( [ ) operator and the two-argument $LENGTH() are other tools that provide related functionality.