strcmp 文字列を比較 呼び出し手順 res = strcmp(string_one, string_two, [,'i']) 引数 string_one 文字列または文字列の行列 string_two 文字列または文字列の行列 'i' strcmpi (大文字小文字に依存)を使用するためのパラメータ, デフォルト値は 's'. res 整数の行列. 説明 res = strcmp(string_one, string_two) (またはres = strcmp(string_one, string_two, 's'))は, 文字列の間の関係(辞書順)を示す整数値を返します. ゼロより大きい値は,一致しない最初の文字について, string_oneの方が string_twoよりも大きな値を有している ことを示します. res = strcmp(string_one, string_two, 'i')は, string_onestring_two (大文字小文字を区別しません) に等しい場合に0を返し, 1はその逆を示します. 参照 strcat strcmpi