Compare

比较字符串。

int  Compare(
   const string  str      // 比较的字符串
   ) const;

参数

str

[输入]  比较的字符串。

返回值

若字符串相等则返回 0, -1 是字符串小于比较的字符串, 1 是字符串大于比较的字符串。

Compare

一个字符串 CString 类实例字符串进行比较。

int  Compare(
   CString*  str      // 对象描述符
   ) const;

参数

str

[输入]  比较的 CString 类对象的描述符。

返回值

若字符串相等则返回 0, -1 是字符串小于比较的字符串, 1 是字符串大于比较的字符串。