bad format for help
[scilab.git] / scilab / modules / string / help / en_US / strindex.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE MAN SYSTEM "../../../../modules/helptools/help.dtd">
3 <MAN>
4   <LANGUAGE>eng</LANGUAGE>
5
6   <TITLE>strindex</TITLE>
7
8   <TYPE>Scilab Function</TYPE>
9
10   <DATE>$LastChangedDate: 2008-01-06 16:57:13 +0200 (Mon, 06 Febrary 2008)$</DATE>
11
12   <SHORT_DESCRIPTION name="strindex">search position of a character string in
13   an other string.</SHORT_DESCRIPTION>
14
15   <CALLING_SEQUENCE>
16     <CALLING_SEQUENCE_ITEM>ind=strindex(haystack,needle
17     )</CALLING_SEQUENCE_ITEM>
18
19     <CALLING_SEQUENCE_ITEM>[ind,which]=strindex(haystack,needle
20     )</CALLING_SEQUENCE_ITEM>
21   </CALLING_SEQUENCE>
22
23   <PARAM>
24     <PARAM_INDENT>
25       <PARAM_ITEM>
26         <PARAM_NAME>haystack</PARAM_NAME>
27
28         <PARAM_DESCRIPTION>
29           <SP>: a character string. The string where to search occurrences of
30           <VERB>needle </VERB></SP>
31         </PARAM_DESCRIPTION>
32       </PARAM_ITEM>
33
34       <PARAM_ITEM>
35         <PARAM_NAME>needle </PARAM_NAME>
36
37         <PARAM_DESCRIPTION>
38           <SP>: a character string or character string vector . The string(s)
39           to search in <VERB>haystack</VERB></SP>
40         </PARAM_DESCRIPTION>
41       </PARAM_ITEM>
42
43       <PARAM_ITEM>
44         <PARAM_NAME>ind</PARAM_NAME>
45
46         <PARAM_DESCRIPTION>
47           <SP>: vector of indexes</SP>
48         </PARAM_DESCRIPTION>
49       </PARAM_ITEM>
50
51       <PARAM_ITEM>
52         <PARAM_NAME>which</PARAM_NAME>
53
54         <PARAM_DESCRIPTION>
55           <SP>: vector of indexes</SP>
56         </PARAM_DESCRIPTION>
57       </PARAM_ITEM>
58
59       <PARAM_ITEM>
60         <PARAM_NAME>"flag"</PARAM_NAME>
61
62         <PARAM_DESCRIPTION>
63           <SP>: string("r" for regular expression)</SP>
64         </PARAM_DESCRIPTION>
65       </PARAM_ITEM>
66     </PARAM_INDENT>
67   </PARAM>
68
69   <DESCRIPTION>
70     <P><VERB>strindex</VERB> searches indexes where <VERB>needle (i)</VERB> is
71     found in <VERB>haystack</VERB></P>
72
73     <P>for each <VERB>k</VERB> it exist a <VERB>i</VERB> shuch that
74     <VERB>part(haystack,ind(k)+(0:length(needle(i))-1))</VERB> is the same
75     string than <VERB>needle(i)</VERB>. If <VERB>which</VERB> argument is
76     required it contains these <VERB>i</VERB>. When using the third parameters
77     "r", the needle should be a string of regular expression. And then
78     strindex is going to match it with haystack according to the regular
79     express rules.</P>
80   </DESCRIPTION>
81
82   <EXAMPLE><![CDATA[
83 k=strindex('SCI/demos/scicos','/')
84 k=strindex('SCI/demos/scicos','SCI/')
85 k=strindex('SCI/demos/scicos','!')
86 k=strindex('aaaaa','aa') 
87 k=strindex('SCI/demos/scicos',['SCI','sci'])
88 [k,w]=strindex('1+3*abc/2.33',['+','-','*','/'])
89 k=strindex('2' ,'/2(]*)?$\1/' ,'r') 
90   ]]></EXAMPLE>
91
92   <SEE_ALSO>
93     <SEE_ALSO_ITEM>
94       <LINK>string</LINK>
95     </SEE_ALSO_ITEM>
96
97     <SEE_ALSO_ITEM>
98       <LINK>strings</LINK>
99     </SEE_ALSO_ITEM>
100   </SEE_ALSO>
101 </MAN>