* `strcmpi` is deprecated. Please use `strcmp(..,"i")`instead.
[scilab.git] / scilab / modules / string / help / ja_JP / strcmp.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: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="ja">
17     <refnamediv>
18         <refname>strcmp</refname>
19         <refpurpose>文字列を比較</refpurpose>
20     </refnamediv>
21     <refsynopsisdiv>
22         <title>呼び出し手順</title>
23         <synopsis>res = strcmp(string_one, string_two, [,'i'])</synopsis>
24     </refsynopsisdiv>
25     <refsection>
26         <title>引数</title>
27         <variablelist>
28             <varlistentry>
29                 <term>string_one</term>
30                 <listitem>
31                     <para>文字列または文字列の行列</para>
32                 </listitem>
33             </varlistentry>
34             <varlistentry>
35                 <term>string_two</term>
36                 <listitem>
37                     <para>文字列または文字列の行列</para>
38                 </listitem>
39             </varlistentry>
40             <varlistentry>
41                 <term>'i'</term>
42                 <listitem>
43                     <para>
44                         optional parameter to compare strings in a case-independent way.
45                         デフォルト値は <literal>'s'</literal>.
46                     </para>
47                 </listitem>
48             </varlistentry>
49             <varlistentry>
50                 <term>res</term>
51                 <listitem>
52                     <para>整数の行列.</para>
53                 </listitem>
54             </varlistentry>
55         </variablelist>
56     </refsection>
57     <refsection>
58         <title>説明</title>
59         <para>
60             <code>res = strcmp(string_one, string_two)</code>
61             (または<code>res = strcmp(string_one, string_two, 's')</code>)は,
62             文字列の間の関係(辞書順)を示す整数値を返します.
63         </para>
64         <para>
65             ゼロより大きい値は,一致しない最初の文字について,
66             <varname>string_one</varname>の方が
67             <varname>string_two</varname>よりも大きな値を有している
68             ことを示します.
69         </para>
70         <para>
71             <code>res = strcmp(string_one, string_two, 'i')</code>は,
72             <varname>string_one</varname> が
73             <varname>string_two</varname> (大文字小文字を区別しません)
74             に等しい場合に<literal>0</literal>を返し,
75             <literal>1</literal>はその逆を示します.
76         </para>
77     </refsection>
78     <refsection>
79         <title>例</title>
80         <programlisting role="example"><![CDATA[
81 TXT1 = ['scilab','SciLab';'Strcmp','STRcmp'];
82 TXT2 = ['ScIlAb','sciLab';'sTrCmP','StrCMP'];
83 strcmp(TXT1,TXT2)
84 strcmp(TXT1,'scilab')
85 strcmp(TXT1,'SciLab')
86 strcmp(TXT1,TXT2,'i')
87  ]]></programlisting>
88     </refsection>
89     <refsection role="see also">
90         <title>参照</title>
91         <simplelist type="inline">
92             <member>
93                 <link linkend="convstr">convstr</link>
94             </member>
95             <member>
96                 <link linkend="comparison">comparison</link>
97             </member>
98         </simplelist>
99     </refsection>
100 </refentry>