* `strcmpi` is deprecated. Please use `strcmp(..,"i")`instead.
[scilab.git] / scilab / modules / string / help / pt_BR / strcmp.xml
1 <?xml version="1.0" encoding="ISO-8859-1"?>
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:ns4="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="strcmp" xml:lang="pt">
17     <refnamediv>
18         <refname>strcmp</refname>
19         <refpurpose>compara strings</refpurpose>
20     </refnamediv>
21     <refsynopsisdiv>
22         <title>Seqüência de Chamamento</title>
23         <synopsis>res = strcmp(string_one,string_two,[,'i'])</synopsis>
24     </refsynopsisdiv>
25     <refsection>
26         <title>Parâmetros</title>
27         <variablelist>
28             <varlistentry>
29                 <term>string_one</term>
30                 <listitem>
31                     <para>string ou matriz de strings</para>
32                 </listitem>
33             </varlistentry>
34             <varlistentry>
35                 <term>string_two</term>
36                 <listitem>
37                     <para>string ou matriz de strings</para>
38                 </listitem>
39             </varlistentry>
40             <varlistentry>
41                 <term>'i'</term>
42                 <listitem>
43                     <para>parâmetro para realização de stricmp caso independente, o
44                         valor padrão é 's'
45                     </para>
46                 </listitem>
47             </varlistentry>
48             <varlistentry>
49                 <term>res</term>
50                 <listitem>
51                     <para>matrix</para>
52                 </listitem>
53             </varlistentry>
54         </variablelist>
55     </refsection>
56     <refsection>
57         <title>Descrição</title>
58         <para>
59             <literal>res = strcmp(string_one,string_two)</literal> retorna um
60             valor inteiro indicando a relação entre os strings.
61         </para>
62         <para>Um valor maior que zero indica que o primeiro caractere não
63             correspondente possui valor maior em <literal>string_one</literal> que em
64             <literal>string_two</literal>
65         </para>
66         <para>Um valor abaixo de zero indica o contrário.</para>
67     </refsection>
68     <refsection>
69         <title>Exemplos</title>
70         <programlisting role="example"><![CDATA[ 
71 TXT1 = ['scilab','SciLab';'Strcmp','STRcmp'];
72 TXT2 = ['ScIlAb','sciLab';'sTrCmP','StrCMP'];
73 strcmp(TXT1,TXT2)
74 strcmp(TXT1,'scilab')
75 strcmp(TXT1,'SciLab')
76 strcmp(TXT1,TXT2,'i')
77  ]]></programlisting>
78     </refsection>
79     <refsection role="see also">
80         <title>Ver Também</title>
81         <simplelist type="inline">
82             <member>
83                 <link linkend="convstr">convstr</link>
84             </member>
85             <member>
86                 <link linkend="comparison">comparison</link>
87             </member>
88         </simplelist>
89     </refsection>
90 </refentry>