Scroll to navigation

STRDUP(3) Library Functions Manual STRDUP(3)

NAME

strdup - duplicate nul-terminated string

SYNOPSIS

char* strdup(char* s)

DESCRIPTION

strdup copies the nul-terminated string s to a new location provided by malloc(3) and returns a pointer to the new copy. 0 is returned if malloc(3) failed.

SEE ALSO

malloc(3), memdup(3)