CStringT::operator !=

更新 : 2007 年 11 月

2 つの文字列が論理的に等しくないかどうかを判断します。

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
    文字列と連結する ANSI 文字または Unicode 文字。

  • ch2
    文字列と連結する ANSI 文字または Unicode 文字。

  • str1
    比較用の CStringT

  • str2
    比較用の CStringT

  • psz1
    比較対象の NULL で終わる文字列を指すポインタ。

  • psz2
    比較対象の NULL で終わる文字列を指すポインタ。

解説

演算子の左側の文字列または文字が、右側の文字列または文字と等しくないかどうかを調べます。

使用例

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

必要条件

ヘッダー : cstringt.h

参照

参照

CStringT クラス

その他の技術情報

CStringT のメンバ