#include <String.h>
The CString class provides access to an 8-bit String representation.
◆ CString() [1/2]
Constructs a CString object with a null string value.
◆ CString() [2/2]
CString::CString |
( |
const CString & |
cstr | ) |
|
Constructs an independent copy of a CString object.
- Parameters
-
◆ ~CString()
◆ operator const char *()
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.
◆ operator=()
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:
- /home/loongson/rpmbuild/BUILD/pegasus/src/Pegasus/Common/String.h