Partager via


CStringT::operator !=

Determines whether two strings are logically not equal.

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

Parameters

  • ch1
    An ANSI or Unicode character to concatenate with a string.

  • ch2
    An ANSI or Unicode character to concatenate with a string.

  • str1
    A CStringT for comparison.

  • str2
    A CStringT for comparison.

  • psz1
    A pointer to a null-terminated string for comparison.

  • psz2
    A pointer to a null-terminated string for comparison.

Remarks

Tests if a string or character on the left side is not equal to a string or character on the right side.

Example

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

Requirements

Header: cstringt.h

See Also

Reference

CStringT Class

Other Resources

CStringT Members