* `strcmpi` is deprecated. Please use `strcmp(..,"i")`instead.
[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  *
15  -->
16 <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">
17     <refnamediv>
18         <refname>strcmpi</refname>
19         <refpurpose>
20             compare character strings (case independent). <emphasis role="bold">This function is obsolete.</emphasis>
21         </refpurpose>
22     </refnamediv>
23     <refsynopsisdiv>
24         <title>Syntax</title>
25         <synopsis>res = strcmpi(string_one, string_two)</synopsis>
26     </refsynopsisdiv>
27     <refsection>
28         <title>Arguments</title>
29         <variablelist>
30             <varlistentry>
31                 <term>string_one</term>
32                 <listitem>
33                     <para>
34                         a character string or matrix of character strings.
35                     </para>
36                 </listitem>
37             </varlistentry>
38             <varlistentry>
39                 <term>string_two</term>
40                 <listitem>
41                     <para>
42                         a character string or matrix of character strings.
43                     </para>
44                 </listitem>
45             </varlistentry>
46             <varlistentry>
47                 <term>res</term>
48                 <listitem>
49                     <para>a matrix of integers.</para>
50                 </listitem>
51             </varlistentry>
52         </variablelist>
53     </refsection>
54     <refsection>
55         <title>Description</title>
56         <para>
57             <code>res = strcmpi(string_one, string_two)</code> returns an
58             integral value indicating the relationship between the strings. The two strings are compared in using the <emphasis role="bold">lexicographical order</emphasis>.
59         </para>
60         <para>
61             The value is <literal>0</literal> if <varname>string_one</varname>
62             is equal to <varname>string_two</varname> (case independently),
63             <literal>1</literal> if <varname>string_one</varname> is greater than <varname>string_two</varname> and <literal>-1</literal> else.
64         </para>
65         <warning>
66             This function is obsolete. Please use <link linkend="strcmp">strcmp(s1,s1,"i")</link> instead.
67         </warning>
68     </refsection>
69     <refsection>
70         <title>Examples</title>
71         <programlisting role="example"><![CDATA[
72 TXT1 = ['scilab','SciLab';'Strcmp','STRcmp'];
73 TXT2 = ['ScIlAb','sciLab';'sTrCmP','StrCMP'];
74 strcmpi(TXT1,TXT2)
75 strcmpi(TXT1,'scilab')
76  ]]></programlisting>
77     </refsection>
78     <refsection role="see also">
79         <title>See also</title>
80         <simplelist type="inline">
81             <member>
82                 <link linkend="strcat">strcat</link>
83             </member>
84             <member>
85                 <link linkend="strcmp">strcmp</link>
86             </member>
87         </simplelist>
88     </refsection>
89     <refsection>
90         <title>History</title>
91         <revhistory>
92             <revision>
93                 <revnumber>6.0</revnumber>
94                 <revdescription>
95                     Function tagged as obsolete. Will be removed from Scilab 6.1
96                 </revdescription>
97             </revision>
98         </revhistory>
99     </refsection>
100 </refentry>