OS Manuals

strdup(3ast)

strdup - duplicate null-terminated string

STRDUP(3ast) STRDUP(3ast)

strdup - duplicate null-terminated string

char* strdup(const char* s)

strdup copies the null-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.

malloc(3), memdup(3)

ksh 1.0.10-r36 · os · ingested 2026-09-30