Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

CStringT::operator ==

Determines whether two strings are logically 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();
ch1

An ANSI or Unicode character for comparison.

ch2

An ANSI or Unicode character for comparison.

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.

Tests whether a string or character on the left side is equal to a string or character on the right side, and returns TRUE or FALSE accordingly.

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

Header: cstringt.h

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.