WMEMMOVE(3POSIX)
π WMEMMOVE(3POSIX) π
okay bestie, welcome to the POSIX Programmer's Manual β this one's called WMEMMOVE(3POSIX) and it's about copying wide characters around in memory when the two regions are being messy and overlapping. classic.
β¨ PROLOG β¨
heads up, gorgeous: this manual page is part of the POSIX Programmer's Manual. 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 not even be implemented on Linux. vibe check accordingly. π
πΈ NAME πΈ
wmemmove β copy wide characters in memory with overlapping areas
π¦ SYNOPSIS π¦
#include <wchar.h>
wchar_t *wmemmove(wchar_t *ws1, const wchar_t *ws2, size_t n);
π« DESCRIPTION π«
The functionality described on this reference page is aligned with the ISO C standard. Any conflict between the requirements described here and the ISO C standard is unintentional β no drama intended, fr. This volume of POSIX.1β2017 defers to the ISO C standard.
So, wmemmove() shall copy n wide characters from the object pointed to by ws2 to the object pointed to by ws1. π
And here's the iconic part β the way the copying shall take place is as if the n wide characters from the object pointed to by ws2 are first copied into a temporary array of n wide characters that does not overlap the objects pointed to by ws1 or ws2, and then the n wide characters from that temporary array are copied into the object pointed to by ws1. it's giving "middleman but make it safe" β¨
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 favorites here. we're all equal in wchar_t land. π«Ά
If n is zero, the application shall ensure that ws1 and ws2 are valid pointers, and the function shall copy zero wide characters. yes bestie, zero still counts β those pointers gotta be real. π
π RETURN VALUE π
The wmemmove() function shall return the value of ws1. that's it. that's the return. iconic behavior honestly.
π₯ ERRORS π₯
No errors are defined.
The following sections are informative.
π EXAMPLES π
None. (not me showing up with zero examples π)
π APPLICATION USAGE π
None.
β RATIONALE β
None.
π§ FUTURE DIRECTIONS π§
None.
π SEE ALSO π
wmemchr()wmemcmp()wmemcpy()wmemset()
The Base Definitions volume of POSIX.1β2017, <wchar.h>
π 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. 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 thing, no cap. go forth and copy your wide characters safely, bestie. overlapping memory could never. π
mwah π β this lil page came to you courtesy of IEEE/The Open Group, dated 2017, and it was WMEMMOVE(3POSIX) all along. periodt. β¨
π¦ 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