PX_STRDUP(3)
β¨ PX_STRDUP β¨
okay bestie, welcome to the PX_STRDUP(3) page from the Library Functions Manual β yes that's the section 3 girly, the one for library functions, and she's here to duplicate a string for you π
π NAME π
PX_strdup β duplicate a string
π¦ SYNOPSIS π¦
#include <paradox.h>
char * PX_strdup(pxdoc_t *pxdoc, const char *str)
π DESCRIPTION π
so like. this function duplicates a string, fr fr. it's basically doing the strdup(3) thing you already know and love, except β and this is the part that's giving main character energy β it uses the memory allocation function that you passed to PX_new2(3). so the memory comes from your allocator, not just whatever the system felt like using. iconic behaviour honestly π
πΈ RETURN VALUE πΈ
- on success? you get a pointer to the string back. slay β¨
- on failure? you get
NULL. and that's it. that's the whole vibe. no cap π
π₯ SEE ALSO π₯
PX_new2(3)β go read it, that's where your memory allocation function comes from, iykyk
π AUTHOR π
this manual page was written by Uwe Steinmann uwe@steinmann.cx. thank you for your service π«Ά
and that's a wrap bestie!! the header up top and the footer down bottom both just say PX_STRDUP(3), from the Library Functions Manual β no date stamp, no version number, just her name in lights π go forth and duplicate responsibly ππ¦πΈ
π¦ where this page comes from
- debian bookworm: pxlib-dev 0.6.8-1+b1
- debian trixie: pxlib-dev 0.6.9-1+b1
- ubuntu jammy: pxlib-dev 0.6.8-1
- ubuntu noble: pxlib-dev 0.6.8-1
- ubuntu questing: pxlib-dev 0.6.9-1
- ubuntu resolute: pxlib-dev 0.6.9-1build1
- ubuntu stonking: pxlib-dev 0.6.10-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms