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::Right
CString                                     Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  CString Right( int nCount ) const
  throw( CMemoryException );
 
  Parameter   Description
 
  <nCount>    The number of characters to extract from this CString
              object.
 
  Remarks
 
  Extracts the last (that is, rightmost) <nCount> characters from this
  CString object and returns a copy of the extracted substring. If
  <nCount> exceeds the string length, then the entire string is
  extracted.
 
  Right is similar to the Basic RIGHT$ command (except that indexes are
  zero-based).
 
  Return Value
 
  A CString object that contains a copy of the specified range of
  characters.
 
  NOTE: The returned CString object may be empty.
 
  Example
 
  CString s( "abcdef" );
  ASSERT( s.Right(3) == "def" );
 
 
  See Also
 
  CString::Mid, CString::Left
 
 
                                     -♦-