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