Export (0) Print
Expand All

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

Parameters

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("dog"), s2("f"), s3("dog");

_ASSERT(s1 == "dog");
_ASSERT(s2 == 'f');
_ASSERT(s1 == s3);

Community Additions

ADD
Show:
© 2014 Microsoft