CString Comparison Operators

These comparison operators compare two strings. The operators are a convenient substitute for the case-sensitive Compare method.

At a Glance

Header file: Afx.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 1.0 and later
Complete documentation: Visual C++ documentation

Syntax

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 );

See Also

Compare