STRNDUP(3POSIX)

πŸ’– strndup β€” the POSIX girlies' guide πŸ’–

okay bestie, welcome to the POSIX Programmer's Manual, page strndup(3POSIX). pull up a chair, grab a boba, we're doing this. πŸ§‹βœ¨


🌸 PROLOG 🌸

real talk first, no cap: this manual page is part of the POSIX Programmer's Manual. heads up though β€” the Linux implementation of this interface may differ (so pls consult the corresponding Linux manual page for the deets on Linux behavior), or honestly the interface may just not be implemented on Linux at all. not me finding that out the hard way 😭


✨ NAME ✨

strndup β€” duplicate a specific number of bytes from a string πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <string.h>

char *strndup(const char *s, size_t size);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so. refer to strdup(). that's it, that's the whole thing, she's a delegator, main character energy by association πŸ‘‘


Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. and like, in the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document β€” so if they disagree, the original wins, periodt. the original Standard can be obtained online at http://www.opengroup.org/unix/online.html 🌈

any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format (the pipeline did us dirty πŸ™ˆ). to report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html


and that's the page, bestie! 🫢 this was brought to you by IEEE/The Open Group, dated 2017, filed under STRNDUP(3POSIX). stay duped, stay duplicated, and always free your mallocs πŸ’–βœ¨πŸŒΈ