Share via


== De CStringT::operator

Détermine si deux chaînes sont logiquement égales.

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

Paramètres

  • ch1
    ANSI ou un caractère Unicode pour la comparaison.

  • ch2
    ANSI ou un caractère Unicode pour la comparaison.

  • str1
    CStringT pour la comparaison.

  • str2
    CStringT pour la comparaison.

  • psz1
    Un pointeur vers une chaîne terminée par le caractère NULL pour la comparaison.

  • psz2
    Un pointeur vers une chaîne terminée par le caractère NULL pour la comparaison.

Notes

Teste si une chaîne ou un caractère du côté gauche est égal à une chaîne ou un caractère situé à droite, et retourne TRUE ou FALSE en conséquence.

Exemple

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

Configuration requise

Header: cstringt.h

Voir aussi

Référence

Classe de CStringT