Share via


CString::GetLength

This method retrieves a count of the characters in this CString object. The count does not include a terminating null character.

int GetLength( )
const; 

Return Value

This is a count of the bytes in the string.

Example

The following example demonstrates the use of CString::GetLength.

// example for CString::GetLength
CString s( "abcdef" );
ASSERT( s.GetLength() == 6 );

Requirements

  Windows CE versions: 1.0 and later
  Header file: Declared in Afx.h
  Platform: H/PC Pro, Palm-size PC, Pocket PC

See Also

CString::IsEmpty