Operatori di confronto CString

BOOL operatore = = ( const CStringamp; s1, const CString & s2 );

BOOL oper&atore = = ( const CStringamp; s1, LPCTSTR s2 );

BOOL oper&atore = = ( LPCTSTR s1, const CStringamp; s2 );

BOOL operatore ! = ( const CStringamp; s1, const CString & s2 );

BOOL oper&atore ! = ( const CStringamp; s1, LPCTSTR s2 );

BOOL oper&atore ! = ( LPCTSTR s1, const CStringamp; s2 );

BOOL operatore lt;( const CString & s1, const CString & s2 );

BOOL operatore lt;( const CString & s1, LPCTSTR s2 );

BOOL operatore lt;( LPCTSTR s1, const CString & s2 );

BOOL operatore gt;( const CString & s1, const CString & s2 );

BOOL operatore gt;( const CString & s1, LPCTSTR s2 );

BOOL operatore gt;( LPCTSTR s1, const CString & s2 );

BOOL operatore lt; = ( const CString & s1, const CString & s2 );

BOOL operatore lt; = ( const CString & s1, LPCTSTR s2 );

BOOL operatore lt; = ( LPCTSTR s1, const CString & s2 );

BOOL operatore gt; = ( const CString & s1, const CString & s2 );

BOOL operatore gt; = ( const CString & s1, LPCTSTR s2 );

BOOL operatore gt; = ( LPCTSTR s1, const CString & s2 );

Valore restituito

Diverso da zero se le stringhe soddisfano la condizione di confronto; in caso contrario 0.

Parametri

s1, s2

Oggetti CString per confrontare.

Osservazioni

Questi operatori di confronto confrontare due stringhe. Gli operatori sono un sostituto conveniente per le maiuscole/minuscole confrontare funzione membro.

Esempio

Nell'esempio seguente viene illustrato l'utilizzo di Operatori di confronto CString.

/ / esempio per gli operatori di confronto CString
CString s1 ("abc");
CString s2 ("abd");
ASSERT (lt s1 s2); / / Operatore è sovraccarico per entrambi.
ASSERT ("ABC" < s1); / / CString e char *
ASSERT (s2 > "abe")

CString panoramica |nbsp; Membri della classe | Gerarchia Chart

Index