Scilab Reference Manual |
---|
strindex — search position of a character string in an other string.
ind=strindex(str1,str2)
str1 | : a character string. The string where to search occurrences of str2 |
str2 | : a character string or character string vector . The string(s) to search in str1 |
ind | : vector of indexes |
strindex searches indexes where str2(i) is found in str1
for each k it exist a i shuch that part(str1,ind(k)+(0:length(str2(i))-1)) is the same string than str2(i)
When str2 is a vector and str2
k=strindex('SCI/demos/scicos','/') k=strindex('SCI/demos/scicos','SCI/') k=strindex('SCI/demos/scicos','!') k=strindex('aaaaa','aa') k=strindex('SCI/demos/scicos',['SCI','sci'])
<< strcat | strings >> |