WMEMCPY(3POSIX)
π WMEMCPY β the POSIX Programmer's Manual, bestie edition π
okay so this is WMEMCPY(3POSIX), straight out of the POSIX Programmer's Manual. Come sit with me, we're gonna go through the whole thing. π«Ά
β¨ PROLOG
Real talk first: this manual page is part of the POSIX Programmer's Manual. But heads up β the Linux implementation of this interface may differ, so pls consult the corresponding Linux manual page for the deets on Linux behavior. Also possible: the interface just... isn't implemented on Linux at all. π iykyk.
πΈ NAME
wmemcpy β copy wide characters in memory. that's it, that's the whole job. iconic. π
π SYNOPSIS
#include <wchar.h>
wchar_t *wmemcpy(wchar_t *restrict ws1, const wchar_t *restrict ws2,
size_t n);
look at that signature. restrict on both pointers, no cap. π
π¦ DESCRIPTION
okay so the functionality described on this reference page is aligned with the ISO C standard. And listen β if there's any conflict between the requirements described here and the ISO C standard, that conflict is unintentional. This volume of POSIX.1β2017 defers to the ISO C standard. periodt.
So what does wmemcpy() actually do? It shall copy n wide characters from the object pointed to by ws2 to the object pointed to by ws1. that's the tea. β
And here's the vibe: this function shall not be affected by locale, and all wchar_t values shall be treated identically. The null wide character and wchar_t values not corresponding to valid characters shall not be treated specially. no favoritism, everyone's equal in this function's eyes. π
now ifnis zero, the application shall ensure thatws1andws2are valid pointers, and the function shall copy zero wide characters. so like, zero copies, but the pointers still gotta be legit. no shortcuts bestie. β¨
π RETURN VALUE
The wmemcpy() function shall return the value of ws1. giving back what you gave it, main character energy honestly. π
π₯ ERRORS
No errors are defined. not a single one. flawless behavior. π
The following sections are informative. (aka: the vibes-only zone, no rules here.) β¨
π EXAMPLES
None. we're keeping it mysterious. π
π§ APPLICATION USAGE
None. nothing more to add, she's self-explanatory. π
β RATIONALE
None. no justification needed when you're this iconic. π
πΈ FUTURE DIRECTIONS
None. the future is bright and unchanged. π¦
π SEE ALSO
wmemchr()wmemcmp()wmemmove()wmemset()
The Base Definitions volume of POSIX.1β2017, <wchar.h>
go read the whole squad, they're all so good. π«Ά
π COPYRIGHT
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.
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, no debate. π
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. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
okay that's the whole page bestie, we ate and left no crumbs π½οΈβ¨ this was IEEE/The Open Group, 2017, WMEMCPY(3POSIX) β mwah, love u, go copy some wide characters responsibly πππ¦
π¦ 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