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::Collate
CString                                     Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  int Collate( const char* psz ) const;
 
  Parameter   Description
 
  <psz>       The other string used for comparison.
 
  Remarks
 
  Performs a locale-specific comparison of two strings; uses the run-time
  function strcoll. Compare performs a faster, ASCII-only comparison.
 
  A CString object can be used as the argument because the class provides
  the appropriate conversion operator.
 
  Return Value
 
  0    The strings are identical.
  -1   This CString object is less than <psz>.
  1    This CString object is greater than <psz>.
 
  Example
 
  CString s1( "abc" );
  CString s2( "abd" );
  ASSERT( s1.Collate( s2 ) == -1 );
 
 
  See Also
 
  CString::Compare, CString::CompareNoCase
 
 
                                     -♦-