VMS Help
CRTL, strdup
*Conan The Librarian
|
Duplicates the specified string.
Format
#include <string.h>
char *strdup (const char *s1);
The strdup function has variants named _strdup32 and _strdup64
for use with 32-bit and 64-bit pointer sizes, respectively.
s1
The string to be duplicated.
The strdup function returns a pointer to a string that is an
exact duplicate of the string pointed to by s1. The malloc
function is used to allocate space for the new string. The strdup
function is provided for compatibility with existing systems.
x A pointer to the resulting string.
NULL Indicates an error.