Programming Guide



sm_strdup

Allocate memory and copy a string to that memory

char *sm_strdup(char *string);

string
The string to be duplicated.

Returns

Description

.If string is not the null pointer, its length is found, sm_fmalloc is called and if it did not return the null pointer, string is copied to the allocated memory. Memory allocated by calling sm_strdup should be freed by calling sm_ffree.

See Also

sm_ffree, sm_fmalloc