int find(string,string)
Return Type: int
Parameters: string input,string search
Description:
This function returns the character index of the first occurrence of the
search parameter in the input parameter. If the search string is not found,
the function returns -1. Character indices are zero based.
Example
Code |
1 >>string
s = "Name => McKinley";
2 >>disp(find(s, "=>"));
5
3 >>disp(find(s, "Denali"));
-1 |