Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.3.0 - 日本語

Change language to:
English - Français - Português

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab manual >> Strings > strcmp

strcmp

文字列を比較

呼び出し手順

res = strcmp(string_one,string_two,[,'i'])

パラメータ

string_one

文字列または文字列の行列

string_two

文字列または文字列の行列

'i'

stricmp (大文字小文字に依存)を使用するためのパラメータ, デフォルト値は 's'

res

行列.

説明

res = strcmp(string_one,string_two) は 文字列の間の関係を示す整数値を返します.

ゼロより大きい値は,一致しない最初の文字について, string_oneの方が string_twoよりも大きな値を有している ことを示します.

ゼロよりも小さな値はその逆であることを示します.

TXT1 = ['scilab','SciLab';'Strcmp','STRcmp'];
TXT2 = ['ScIlAb','sciLab';'sTrCmP','StrCMP'];
strcmp(TXT1,TXT2)
strcmp(TXT1,'scilab')
strcmp(TXT1,'SciLab')
strcmp(TXT1,TXT2,'i')
<< strchr Strings strcmpi >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Jan 26 16:25:13 CET 2011