文字列比較関数

_stricmp、_wcsicmp、_mbsicmp、_stricmp_l、_wcsicmp_l、_mbsicmp_l

実行列比較は大文字と小文字を区別しません。

構文:

int型_stricmp(
   のconstのchar *文字列1、
   constのchar型* string2の
);
int型_wcsicmp(
   のconst wchar_t型*文字列1、
   constのはwchar_t * string2の
);
int型_mbsicmp(
   のconst unsigned char型*文字列1、
   のconst unsigned char型* string2の
);
INT _stricmp_l(
   CONSTのchar *文字列1、
   CONSTのchar *文字列2、
   _locale_tロケール
)。
int型_wcsicmp_l(
   のconst wchar_t型*文字列1、
   constのはwchar_t * string2の、
   _locale_tロケール
)。
INT _mbsicmp_l(
   CONSTはunsigned char *文字列1、
   CONSTはunsigned char *文字列2、
   _locale_tロケール
)。

 

パラメータ

文字列1文字列2
NULLで終わる文字列を比較します。

ロケール
エリアの設定が使用されます。

返却値

戻り値は示して文字列1文字列2以下に示すように、関係。

返却値 説明
<0 文字列1未満string2の
0 string1がに等しく、string2の
> 0 string1がより大きく、string2の
公開された69元の記事 ウォン称賛10 ビュー30000 +

おすすめ

転載: blog.csdn.net/u010096608/article/details/103484001