CString Class Reference

#include <String.h>

List of all members.

Public Member Functions

 CString ()
 CString (const CString &cstr)
 ~CString ()
CStringoperator= (const CString &cstr)
 operator const char * () const

Detailed Description

The CString class provides access to an 8-bit String representation.


Constructor & Destructor Documentation

CString::CString (  ) 

Constructs a CString object with a null string value.

CString::CString ( const CString cstr  ) 

Constructs an independent copy of a CString object.

Parameters:
cstr The CString instance to copy.
CString::~CString (  ) 

Destructs a CString object.


Member Function Documentation

CString::operator const char * (  )  const

Gets the CString's data as a C string pointer. IMPORTANT: The returned pointer refers to memory owned by the CString object. The caller must not free this memory. The returned pointer is valid only until the CString object is destructed or reassigned. Use of this operator on a temporary CString object may result in a memory error. For example, this usage is invalid:

const char* cstr = String("Hello").getCString(); printf(cstr);

Returns:
Returns a const char pointer to the CString's data.
CString& CString::operator= ( const CString cstr  ) 

Copies the value of another CString object.

Parameters:
cstr The CString object from which to copy the value.
Returns:
A reference to the target CString object with its newly assigned value.

The documentation for this class was generated from the following file:
  • /var/tmp/axbld-11697/rpm/BUILD/pegasus/src/Pegasus/Common/String.h