Condividi tramite


== Di CStringT::operator

Determina se due stringhe sono logicamente uguali.

friend bool operator==(
   const CStringT& str1,
   const CStringT& str2
) throw();
friend bool operator==(
   const CStringT& str1
   PCXSTR psz2
) throw();
friend bool operator==(
   const CStringT& str1,
   PCYSTR psz2
) throw();
friend bool operator==(
   const CStringT& str1,
   XCHAR ch2
) throw();
friend bool operator==(
   PCXSTR psz1
   const CStringT& str2
) throw();
friend bool operator==(
   PCYSTR psz1
   const CStringT& str2,
) throw();
friend bool operator==(
   XCHAR ch1
   const CStringT& str2,
) throw();

Parametri

  • ch1
    Un ANSI o un carattere unicode per il confronto.

  • ch2
    Un ANSI o un carattere unicode per il confronto.

  • str1
    CStringT per il confronto.

  • str2
    CStringT per il confronto.

  • psz1
    Un puntatore a una stringa con terminazione null per il confronto.

  • psz2
    Un puntatore a una stringa con terminazione null per il confronto.

Note

Verifica se una stringa o un carattere di sinistra è uguale a una stringa o un carattere a destra e TRUE o FALSE di restituzione di conseguenza.

Esempio

// typedef CStringT< TCHAR, StrTraitATL< TCHAR > > CAtlString;
CAtlString s1(_T("dog")), s2(_T("f")), s3(_T("dog"));

ASSERT(s1 == _T("dog"));
ASSERT(s2 == _T('f'));
ASSERT(s1 == s3);   

Requisiti

Header: cstringt.h

Vedere anche

Riferimenti

Classe di CStringT