STRING_V2 => string
[scilab.git] / scilab / modules / string / help / en_US / strcmp.xml
1 <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
2 <!DOCTYPE MAN SYSTEM "../../../../modules/helptools/help.dtd">
3 <MAN>
4   <LANGUAGE>eng</LANGUAGE>
5   <TITLE>strcmp</TITLE>
6   <TYPE>Scilab Function</TYPE>
7   <DATE>$LastChangedDate: 2006-08-08 16:57:13 +0200 (Tue, 08 Aug 2006) $</DATE>
8   <SHORT_DESCRIPTION name="strcmp"> compare character strings</SHORT_DESCRIPTION>
9   <CALLING_SEQUENCE>
10     <CALLING_SEQUENCE_ITEM> res = strcmp(str1,str2,[,'i'])  </CALLING_SEQUENCE_ITEM>
11   </CALLING_SEQUENCE>
12   <PARAM>
13     <PARAM_INDENT>
14       <PARAM_ITEM>
15         <PARAM_NAME>str1</PARAM_NAME>
16         <PARAM_DESCRIPTION>
17           <SP>: string or matrix of strings</SP>
18         </PARAM_DESCRIPTION>
19       </PARAM_ITEM>
20       
21       <PARAM_ITEM>
22         <PARAM_NAME>str2</PARAM_NAME>
23         <PARAM_DESCRIPTION>
24           <SP>: string or matrix of strings</SP>
25         </PARAM_DESCRIPTION>
26       </PARAM_ITEM>
27       
28       <PARAM_ITEM>
29         <PARAM_NAME>'i'</PARAM_NAME>
30         <PARAM_DESCRIPTION>
31           <SP>: parameter to do stricmp, default value is 's'</SP>
32         </PARAM_DESCRIPTION>
33       </PARAM_ITEM>
34       <PARAM_ITEM>
35         <PARAM_NAME>res</PARAM_NAME>
36         <PARAM_DESCRIPTION>
37           <SP>: matrix.</SP>
38         </PARAM_DESCRIPTION>
39       </PARAM_ITEM>
40     </PARAM_INDENT>
41   </PARAM>
42   <DESCRIPTION>
43     <P><VERB>res = strcmp(str1,str2)</VERB> returns an integral value indicating the relationship between the strings.</P>
44     <P>A value greater than zero indicates that the first character that does not match has a greater value in <VERB>str1</VERB> than in <VERB>str2</VERB></P>
45     <P>And a value less than zero indicates the opposite.</P>
46   </DESCRIPTION>
47   <EXAMPLE>
48 <![CDATA[
49 TXT1 = ['scilab','SciLab';'Strcmp','STRcmp'];
50 TXT2 = ['ScIlAb','sciLab';'sTrCmP','StrCMP'];
51 strcmp(TXT1,TXT2)
52 strcmp(TXT1,'scilab')
53 strcmp(TXT1,'SciLab')
54 strcmp(TXT1,TXT2,'i')
55  ]]>
56   </EXAMPLE>
57   <SEE_ALSO>
58     <SEE_ALSO_ITEM>
59       <LINK>strcat</LINK>
60     </SEE_ALSO_ITEM>
61     <SEE_ALSO_ITEM>
62       <LINK>strcmpi</LINK>
63     </SEE_ALSO_ITEM>
64   </SEE_ALSO>
65 </MAN>