delorie.com/djgpp/doc/libc/libc_758.html | search |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#include <string.h> char * strdup (const char *source); |
Returns a newly allocated area of memory that contains a duplicate of the string pointed to by source. The memory returned by this call must be freed by the caller.
Returns the newly allocated string, or NULL if there is no more memory.
ANSI/ISO C | No |
POSIX | No |
char *foo() { return strdup("hello"); } |
webmaster | delorie software privacy |
Copyright © 2004 | Updated Apr 2004 |