Copies a string to a newly allocated buffer.
char * _strdup (char * string);
char * strdup (char * string);
Required Header |
<string.h> |
Return Value
The new string address is returned.
Parameters
string
The string to duplicate
Remarks
The _strdup function copies string into an allocated heap memory block which is the same size as string.
See Also strcpy