Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
CString::Left
CString                                     Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  CString Left( int nCount ) const
  throw( CMemoryException );
 
  Parameter   Description
 
  <nCount>    The number of characters to extract from this CString
              object.
 
  Remarks
 
  Extracts the first (that is, leftmost) <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.
 
  Left is similar to the Basic LEFT$ command (except that indexes are
  zero-based).
 
  Return Value
 
  A CString object containing a copy of the specified range of
  characters.
 
  NOTE: The returned CString object may be empty.
 
  Example
 
  CString s( "abcdef" );
  ASSERT( s.Left(3) == "abc" );
 
 
  See Also
 
  CString::Mid, CString::Right
 
 
                                     -♦-