Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

PString::PString ( const char *  cstr  ) 

Create a string from the C string array. This is most commonly used with a literal string, eg "hello". A new memory block is allocated of a size sufficient to take the length of the string and its terminating '' character.

If UCS-2 is used then each char from the char pointer is mapped to a single UCS-2 character.

Parameters:
cstr  Standard '' terminated C string.

Definition at line 1244 of file contain.cxx.

  : PCharArray(cstr != NULL ? strlen(cstr)+1 : 1)
{
  if (cstr != NULL)
    memcpy(theArray, cstr, GetSize());
}


Generated by  Doxygen 1.6.0   Back to index