| MATLAB Function Reference | ![]() |
Syntax
k = findstr(str1,str2)
Description
k = findstr( 從較長的字串中尋找較短字串,並傳回短字串所出現的位置。str1,str2)
Examples
str1 = 'Find the starting indices of the shorter string.';
str2 = 'the';
findstr(str1,str2)
ans =
6 30
See Also
| findobj | finish | ![]() |