Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CString::CompareNoCase
CString                                     Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  int CompareNoCase( const char* psz ) const;
 
  Parameter   Description
 
  <psz>       The other string used for comparison.
 
  Remarks
 
  Compares this CString object with another string, character by
  character; uses the run-time function stricmp. The algorithm for
  deciding case applies only to ASCII characters: ('A' == 'a' -> 'Z' ==
  'z').
 
  If you need a language-specific comparison, use the Collate member
  function.
 
  Return Value
 
  0    The strings are identical (ignoring case).
  -1   This CString object is less than <psz> (ignoring case).
  1    This CString object is greater than <psz> (ignoring case).
 
  Example
 
  CString s1( "abc" );
  CString s2( "ABD" );
  ASSERT( s1.CompareNoCase( s2 ) == -1 ); // Compare with a CString
  ASSERT( s1.Compare( "ABE" ) == -1 ); // Compare with a char * string
 
 
  See Also
 
  CString::Compare, CString::Collate
 
 
                                     -♦-