strcmp

strcmp -- バイナリでも使える文字列比較

説明

int strcmp(string str1, string str2);

str1str2 よりも小さければ < 0 を、str1str2よりも大きければ > 0 を、 等しければ 0 を返す。

この比較は大文字小文字を区別することに注意してください。

ereg, strcasecmp, substr, stristr, strstr も参照下さい。