home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_300
/
352_01
/
strppasn.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1991-05-01
|
493b
|
20 lines
// STRPPASN.CPP
// String::assign () transfers ownership of data to the String
// ( allows constructing Strings from allocated buffers
// ... without having to 'strdup' or make extra copies. )
//
#include "dblib.h"
void String::assign ( char *data )
{
typedef char *ASSIGN_DATA_PTR;
destruct ();
if ( data != NULL )
{
_NORMALIZE( data, ASSIGN_DATA_PTR );
s=data;
n=strlen (data);
}
}
//----------------- end of STRPPASS.CPP -----------------------