1 <?xml version="1.0" encoding="UTF-8"?>
4 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
5 * Copyright (C) INRIA -
7 * Copyright (C) 2012 - 2016 - Scilab Enterprises
9 * This file is hereby licensed under the terms of the GNU GPL v2.0,
10 * pursuant to article 5.3.4 of the CeCILL v.2.1.
11 * This file was originally licensed under the terms of the CeCILL v2.1,
12 * and continues to be available under such terms.
13 * For more information, see the COPYING file which you should have received
14 * along with this program.
18 <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">
22 <refname>strcmp</refname>
24 <refpurpose>文字列を比較</refpurpose>
32 <synopsis>res = strcmp(string_one, string_two, [,'i'])</synopsis>
44 <term>string_one</term>
48 <para>文字列または文字列の行列</para>
56 <term>string_two</term>
60 <para>文字列または文字列の行列</para>
74 <function>strcmpi</function>
76 (大文字小文字に依存)を使用するためのパラメータ, デフォルト値は
78 <literal>'s'</literal>.
108 <code>res = strcmp(string_one, string_two)</code>
110 (または<code>res = strcmp(string_one, string_two, 's')</code>)は,
112 文字列の間の関係(辞書順)を示す整数値を返します.
118 ゼロより大きい値は,一致しない最初の文字について,
120 <varname>string_one</varname>の方が
122 <varname>string_two</varname>よりも大きな値を有している
130 <code>res = strcmp(string_one, string_two, 'i')</code>は,
132 <varname>string_one</varname> が
134 <varname>string_two</varname> (大文字小文字を区別しません)
136 に等しい場合に<literal>0</literal>を返し,
138 <literal>1</literal>はその逆を示します.
148 <programlisting role="example"><![CDATA[
149 TXT1 = ['scilab','SciLab';'Strcmp','STRcmp'];
150 TXT2 = ['ScIlAb','sciLab';'sTrCmP','StrCMP'];
152 strcmp(TXT1,'scilab')
153 strcmp(TXT1,'SciLab')
154 strcmp(TXT1,TXT2,'i')
159 <refsection role="see also">
163 <simplelist type="inline">
167 <link linkend="strcat">strcat</link>
173 <link linkend="strcmpi">strcmpi</link>