网站首页  词典首页

请输入您要查询的计算机术语:

 

术语 CString::Comparison operators
释义 CString::比较操作符

BOOL operator ==( const CString& s1, const CString& s2 );
BOOL operator ==( const CString& s1, LPCTSTR s2 );
BOOL operator ==( LPCTSTR s1, const CString& s2 );
BOOL operator !=( const CString& s1, const CString& s2 );
BOOL operator !=( const CString& s1, LPCTSTR s2 );
BOOL operator !=( LPCTSTR s1, const CString& s2 );
BOOL operator < ( const CString& s1, const CString& s2 );
BOOL operator < ( const CString& s1, LPCTSTR s2 );
BOOL operator < ( LPCTSTR s1, const CString& s2 );
BOOL operator > ( const CString& s1, const CString& s2 );
BOOL operator > ( const CString& s1, LPCTSTR s2 );
BOOL operator > ( LPCTSTR s1, const CString& s2 );
BOOL operator <=( const CString& s1, const CString& s2 );
BOOL operator <=( const CString& s1, LPCTSTR s2 );
BOOL operator <=( LPCTSTR s1, const CString& s2 );
BOOL operator >=( const CString& s1, const CString& s2 );
BOOL operator >=( const CString& s1, LPCTSTR s2 );
BOOL operator >=( LPCTSTR s1, const CString& s2 );

返回值:如果字符串满足比较条件则返回非零值;否则返回0。

参数:
s1, s2要比较的CString对象。

说明:
这些比较操作符用来比较两个字符串。它们是区分大小写的Compare成员函数的方便的代用符。

示例:
// CString比较操作符示例:
CString s1( "abc" );
CString s2( "abd" );
ASSERT( s1 < s2 ); // Operator is overloaded for both.
ASSERT( "ABC" < s1 ); // CString and char*
ASSERT( s2 > "abe" );
随便看

 

MFC类库中文详解手册包含4274条MFC类库参考词条,基本涵盖了Microsoft基本类库中的类、全局函数、全局变量和宏的内容,是计算机编程的有利工具。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 10:27:36