GPL + CeCILL Header change
[scilab.git] / scilab / modules / string / help / en_US / strcmpi.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) INRIA - 
5  * 
6  * Copyright (C) 2012 - 2016 - Scilab Enterprises
7  *
8  * This file is hereby licensed under the terms of the GNU GPL v2.0,
9  * pursuant to article 5.3.4 of the CeCILL v.2.1.
10  * This file was originally licensed under the terms of the CeCILL v2.1,
11  * and continues to be available under such terms.
12  * For more information, see the COPYING file which you should have received
13  * along with this program.
14  * === LICENSE_END ===
15  *
16  -->
17 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="strcmpi">
18     <refnamediv>
19         <refname>strcmpi</refname>
20         <refpurpose>
21             compare character strings (case independent)
22         </refpurpose>
23     </refnamediv>
24     <refsynopsisdiv>
25         <title>Calling Sequence</title>
26         <synopsis>res = strcmpi(string_one, string_two)</synopsis>
27     </refsynopsisdiv>
28     <refsection>
29         <title>Arguments</title>
30         <variablelist>
31             <varlistentry>
32                 <term>string_one</term>
33                 <listitem>
34                     <para>
35                         a character string or matrix of character strings.
36                     </para>
37                 </listitem>
38             </varlistentry>
39             <varlistentry>
40                 <term>string_two</term>
41                 <listitem>
42                     <para>
43                         a character string or matrix of character strings.
44                     </para>
45                 </listitem>
46             </varlistentry>
47             <varlistentry>
48                 <term>res</term>
49                 <listitem>
50                     <para>a matrix of integers.</para>
51                 </listitem>
52             </varlistentry>
53         </variablelist>
54     </refsection>
55     <refsection>
56         <title>Description</title>
57         <para>
58             <code>res = strcmpi(string_one, string_two)</code> returns an
59             integral value indicating the relationship between the strings. The two strings are compared in using the <emphasis role="bold">lexicographical order</emphasis>.
60         </para>
61         <para>
62             The value is <literal>0</literal> if <varname>string_one</varname>
63             is equal to <varname>string_two</varname> (case independently),
64             <literal>1</literal> if <varname>string_one</varname> is greater than <varname>string_two</varname> and <literal>-1</literal> else.
65         </para>
66     </refsection>
67     <refsection>
68         <title>Examples</title>
69         <programlisting role="example"><![CDATA[ 
70 TXT1 = ['scilab','SciLab';'Strcmp','STRcmp'];
71 TXT2 = ['ScIlAb','sciLab';'sTrCmP','StrCMP'];
72 strcmpi(TXT1,TXT2)
73 strcmpi(TXT1,'scilab')
74  ]]></programlisting>
75     </refsection>
76     <refsection role="see also">
77         <title>See Also</title>
78         <simplelist type="inline">
79             <member>
80                 <link linkend="strcat">strcat</link>
81             </member>
82             <member>
83                 <link linkend="strcmp">strcmp</link>
84             </member>
85         </simplelist>
86     </refsection>
87 </refentry>