Share via


CStringT::operator ! =

Détermine si deux chaînes sont logiquement pas é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 à concaténer avec une chaîne.

  • ch2
    ANSI ou un caractère Unicode à concaténer avec une chaîne.

  • 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 n'est pas égal à une chaîne ou un caractère situé à droite.

Exemple

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

ASSERT(s1 != _T("dog"));
ASSERT(s2 != _T('t'));
ASSERT(s1 != s2);   

Configuration requise

Header: cstringt.h

Voir aussi

Référence

Classe de CStringT