1 | function k = xml_findstr(s,p,i,n) |
---|
2 | %XML_FINDSTR Find one string within another |
---|
3 | % K = XML_FINDSTR(TEXT,PATTERN) returns the starting indices of any |
---|
4 | % occurrences of the string PATTERN in the string TEXT. |
---|
5 | % |
---|
6 | % K = XML_FINDSTR(TEXT,PATTERN,INDICE) returns the starting indices |
---|
7 | % equal or greater than INDICE of occurrences of the string PATTERN |
---|
8 | % in the string TEXT. By default, INDICE equals to one. |
---|
9 | % |
---|
10 | % K = XML_FINDSTR(TEXT,PATTERN,INDICE,NBOCCUR) returns the NBOCCUR |
---|
11 | % starting indices equal or greater than INDICE of occurrences of |
---|
12 | % the string PATTERN in the string TEXT. By default, INDICE equals |
---|
13 | % to one and NBOCCUR equals to Inf. |
---|
14 | % |
---|
15 | % Examples |
---|
16 | % s = 'How much wood would a woodchuck chuck?'; |
---|
17 | % xml_findstr(s,' ') returns [4 9 14 20 22 32] |
---|
18 | % xml_findstr(s,' ',10) returns [14 20 22 32] |
---|
19 | % xml_findstr(s,' ',10,1) returns 14 |
---|
20 | % |
---|
21 | % See also STRFIND, FINDSTR |
---|
22 | |
---|
23 | % Guillaume Flandin |
---|
24 | % Copyright 2002 INRIA Sophia Antipolis |
---|
25 | % $Revision: 1.0 $ $Date: 2002/04/10 22:50:32 $ |
---|
26 | % Implemented in a MATLAB mex file. |
---|
27 | |
---|
28 | error(sprintf('Missing MEX-file: %s', mfilename)); |
---|