术语 | 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。 参数:
说明: 这些比较操作符用来比较两个字符串。它们是区分大小写的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基本类库中的类、全局函数、全局变量和宏的内容,是计算机编程的有利工具。