Finding a sting - function strfind:
The function strfind does necessarily similar thing, except that the order of the arguments does make dissimilarity. The common form is strfind(string, substring); it finds all the occurrences of the substring within the string, and it returns the subscripts.
>> strfind('abcdeabcde','e')
ans =
5 10
For both the strfind and findstr, if there are no occurrences, then the empty vector is returned.
>> strfind('abcdeabcde','ef')
ans =
[]