WMEMMOVE(3P)

πŸ’– WMEMMOVE(3P) πŸ’–

okay bestie, welcome to the POSIX Programmer's Manual β€” yes, the whole POSIX Programmer's Manual, and this is the WMEMMOVE(3P) page. sit with me, we're gonna vibe through it together 🫢

🌸 PROLOG 🌸

bestie, real talk first: this manual page is part of the POSIX Programmer's Manual. but like… the Linux implementation of this interface may differ, so if you're on Linux you should go check the corresponding Linux manual page for the deets on Linux behavior. or β€” plot twist β€” the interface might not even be implemented on Linux at all. so like, vibe check your platform first, ok? πŸ’…


✨ NAME ✨

wmemmove β€” copy wide characters in memory with overlapping areas

yes she copies wide characters, and yes she handles overlapping areas. that's her whole thing. main character energy fr.


πŸŽ€ SYNOPSIS πŸŽ€

#include <wchar.h>

wchar_t *wmemmove(wchar_t *ws1, const wchar_t *ws2, size_t n);

look at her. three little params. iconic.


πŸ¦‹ DESCRIPTION πŸ¦‹

so the functionality described on this reference page is aligned with the ISO C standard. if there's ever any conflict between the requirements described here and the ISO C standard, that conflict is unintentional β€” no drama intended, it's just how it is. and this volume of POSIX.1‐2017 defers to the ISO C standard, periodt.

okay so what does wmemmove() actually do? she shall copy n wide characters from the object pointed to by ws2 into the object pointed to by ws1.

and here's the cute part β€” the copying shall take place 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. so like… she takes the scenic route specifically so overlap can't hurt her. it's giving careful. it's giving considerate. 🧚

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 that don't correspond to valid characters shall not be treated specially. no favorites here. everyone's equal. πŸ’œ

and if n is zero? the application shall ensure that ws1 and ws2 are valid pointers (yes even then, don't get cute with it), and the function shall copy zero wide characters. zero. nothing. she did nothing and she ate. πŸ”₯


🌈 RETURN VALUE 🌈

wmemmove() shall return the value of ws1. that's it. that's the return. she gives you back your destination pointer like a lil gift 🎁


πŸ’… ERRORS πŸ’…

No errors are defined

and then β€” important lil heads up β€” the following sections are informative: ✨


πŸ“ EXAMPLES πŸ“

None.

(it's giving "we trust you" ngl)


🌸 APPLICATION USAGE 🌸

None.


πŸ’œ RATIONALE πŸ’œ

None.


πŸ¦‹ FUTURE DIRECTIONS πŸ¦‹

None.


⭐ SEE ALSO ⭐

  • wmemchr()
  • wmemcmp()
  • wmemcpy()
  • wmemset()

and also the Base Definitions volume of POSIX.1‐2017, <wchar.h> β€” go read her too, she's part of the lore πŸ“š


okay legal bestie moment, gotta be precise here:

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. (she's the final boss, no appeals πŸ’€)

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 .


no cap, that's the whole page. every flag, every value, every pointer, all of it. you're so welcome bestie 🫢

and that's a wrap, babes β€” this lil masterpiece came to you courtesy of IEEE/The Open Group, 2017, page WMEMMOVE(3P). slay, bye πŸ’–βœ¨

πŸ“¦ where this page comes from