Finds a character
or substring inside a larger string.
Parameters
<Target string> The main string where the searching has to be done.
<Search string> The string or the character to be searched.
[Offset] The zero based index value of the character in
the main string where the search for the substr should begin. Offset starts from the value 0.
Return Value
Returns the zero based index of the first character in
the "Target string" that matches the requested substring or character, returns -1
if the substring or character is not found.
Example
$a="ABCDEFGABCD"
$b=Find($a,"CD",4)
display $b
Here search for the substring "CD" starts from offset value 4. Thus, $b
will contain 9.
If the offset value is given as 1 then $b will contain 2.