STPNCPY(3POSIX)
πΈ STPNCPY β the POSIX girlies' copy page πΈ
okay so before we even get into it: this page lives in the POSIX Programmer's Manual, bestie. that's the manual name, that's the whole vibe. π
π PROLOG π
so like, heads up before you fall in love with this function: this manual page is part of the POSIX Programmer's Manual. the Linux implementation of this interface may differ β and by "may differ" I mean consult the corresponding Linux manual page for details, fr fr, don't come crying to me. π
also possible: the interface may not be implemented on Linux at all. no cap. vibe check your platform first. π¦
β¨ NAME β¨
stpncpy β copy fixed length string, returning a pointer to the array end
it's giving "copy a string but make it exactly this many characters and then hand you the end pointer." iconic behaviour honestly. π
π SYNOPSIS π
#include <string.h>
char *stpncpy(char *restrict s1, const char *restrict s2, size_t size);
look at her. restrict on both pointers, size_t size for the length, returns a char *. she's little but she's load-bearing. π«Ά
π DESCRIPTION π
okay so the entire description is literally just:
Refer to strncpy().
that's it. that's the whole thing. this page is a redirect, a link in bio situation, a "ask my sister she knows more" moment. so if you want the actual details, go read strncpy(). this one just points you there and trusts you'll figure it out. main character energy, minimal effort. π
π COPYRIGHT π
okay now the serious part, and I need you to actually read this one, bestie, because it's legal and we don't play with that. β
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 here's the part that matters: 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. like, it's the final boss. this page is just the fan edit. π
the original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
also, 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. so if something looks cursed, it's probably the conversion's fault, not the Standard's. to report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html . π
okay that's the whole page, you ate it, I'm proud of you. go forth and stpncpy responsibly. π§π
and that's a wrap on the IEEE/The Open Group, 2017 era of STPNCPY(3POSIX) β mwah, take care of her, she's an icon. πΈπ
β¨
π¦ where this page comes from
- debian bookworm: manpages-posix-dev 2017a-2 Β· Other
- debian trixie: manpages-posix-dev 2017a-2 Β· Other
- ubuntu jammy: manpages-posix-dev 2017a-2 Β· Other
- ubuntu noble: manpages-posix-dev 2017a-2 Β· Other
- ubuntu resolute: manpages-posix-dev 2017a-2build1 Β· Other
- ubuntu stonking: manpages-posix-dev 2017a-2.1 Β· Other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms