This documentation is archived and is not being maintained.

CStringT::operator !=

Determines if two strings are logically not equal.

CThisString& operator!=(
   const CStringT& str1,
   const CStringT& str2
) throw();
CThisString& operator!=(
   const CStringT& str1
   PCXSTR psz2
) throw();
CThisString& operator!=(
   PCXSTR psz1
   const CStringT& str2
) throw();
CThisString& operator!=(
   const CStringT& str1,
   PCYSTR psz2
) throw();
CThisString& operator!=(
   PCYSTR psz1
   const CStringT& str2,
) throw();
CThisString& operator!=(
   XCHAR ch1
   const CStringT& str2,
) throw();
CThisString& operator!=(
   const CStringT& str1,
   XCHAR ch2
) 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/character on the left side is not equal to a string/character on the right side.

Example

The following example demonstrates the use of CStringT::operator !=.

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

_ASSERT(s1 != "dog");
_ASSERT(s2 != 't');
_ASSERT(s1 != s2);

See Also

CStringT Overview | Class Members

Show: