Allocate a copy of a string on the heap.
char* __fastcall__ strdup (const char* s);
strdupallocates a memory block on the heap, big enough to hold a copy of
sincluding the terminating zero. If the allocation fails,
NULLis returned, otherwise
sis copied into the allocated memory block, and a pointer to the block is returned.
- The function is only available as fastcall function, so it may only be used in presence of a prototype.
- It is up to the caller to free the allocated memory block.
- See also