STRDUP(3)
πΈ NAME πΈ
okay so bestie, welcome to the STRDUP(3) page from the Library Functions Manual, and the main character is strdup β duplicate nul-terminated string. π
β¨
β¨ SYNOPSIS β¨
char* strdup(char* s)
π¦ DESCRIPTION π¦
okay so here's the tea: strdup copies the nul-terminated string s to a new location provided by malloc(3) and returns a pointer to the new copy. it's giving fresh duplicate, same string energy, and the new location is literally from malloc(3). π¦
and if malloc(3) failed? 0 is returned. yep, zero, that's the whole rule, no cap. π
π SEE ALSO π
malloc(3)β the other page to check out, bestie. πmemdup(3)β also in the SEE ALSO section, periodt. π
π xoxo, your STRDUP(3) bestie from the Library Functions Manual β no date/version tea in the footer, so that's the whole page, periodt. π
π¦ where this page comes from
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 Β· CPL-1.0
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 Β· CPL-1.0
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 Β· CPL-1.0
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 Β· CPL-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms