a4eb8f2e807879d06095043cff2123057db29768
[scilab.git] / scilab / modules / string / help / en_US / strchr.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>strchr</TITLE>
7
8   <TYPE>Scilab Function</TYPE>
9
10   <DATE>$LastChangedDate: 2006-08-08 16:57:13 +0200 (Tue, 08 Aug 2006)
11   $</DATE>
12
13   <SHORT_DESCRIPTION name="strchr">Find the first occurrence of a character in
14   a string</SHORT_DESCRIPTION>
15
16   <CALLING_SEQUENCE>
17     <CALLING_SEQUENCE_ITEM>res = strchr(haystack,char)</CALLING_SEQUENCE_ITEM>
18   </CALLING_SEQUENCE>
19
20   <PARAM>
21     <PARAM_INDENT>
22       <PARAM_ITEM>
23         <PARAM_NAME>haystack</PARAM_NAME>
24
25         <PARAM_DESCRIPTION>
26           <SP>: string or matrix of strings</SP>
27         </PARAM_DESCRIPTION>
28       </PARAM_ITEM>
29
30       <PARAM_ITEM>
31         <PARAM_NAME>char</PARAM_NAME>
32
33         <PARAM_DESCRIPTION>
34           <SP>: a character.</SP>
35         </PARAM_DESCRIPTION>
36       </PARAM_ITEM>
37
38       <PARAM_ITEM>
39         <PARAM_NAME>res</PARAM_NAME>
40
41         <PARAM_DESCRIPTION>
42           <SP>: string or matrix of strings</SP>
43         </PARAM_DESCRIPTION>
44       </PARAM_ITEM>
45     </PARAM_INDENT>
46   </PARAM>
47
48   <DESCRIPTION>
49     <P><VERB>res = strchr(haystack,char)</VERB> Returns the first occurrence
50     of character in the string str.</P>
51
52     <P>num must have same dimensions than haystack or only one char.</P>
53   </DESCRIPTION>
54
55   <EXAMPLE><![CDATA[
56
57 strchr('This is a sample string','s')
58 strchr(['This is a sample string','in scilab'],'s')
59 strchr(['This is a sample string','in scilab'],['s','a'])
60
61         ]]></EXAMPLE>
62
63   <SEE_ALSO>
64     <SEE_ALSO_ITEM>
65       <LINK>strrchr</LINK>
66     </SEE_ALSO_ITEM>
67
68     <SEE_ALSO_ITEM>
69       <LINK>strstr</LINK>
70     </SEE_ALSO_ITEM>
71   </SEE_ALSO>
72 </MAN>