WCSNCAT(3POSIX)

πŸ’– WCSNCAT(3POSIX) πŸ’–

okay so bestie, welcome to the POSIX Programmer's Manual entry for wcsncat β€” this one lives in section 3, and it's giving wide character girlie. pull up a chair, we're doing string surgery πŸ’…


✨ PROLOG ✨

real talk first, no cap: this manual page is part of the POSIX Programmer's Manual. the Linux implementation of this interface may differ β€” so if you're on Linux, go consult the corresponding Linux manual page for the actual deets on Linux behavior. or, plot twist, the interface might not even be implemented on Linux at all 😭. vibe check accordingly.


🌸 NAME 🌸

wcsncat β€” concatenate a wide-character string with part of another 🧚


πŸŽ€ SYNOPSIS πŸŽ€

#include <wchar.h>

wchar_t *wcsncat(wchar_t *restrict ws1, const wchar_t *restrict ws2,
    size_t n);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea: the functionality on this reference page is aligned with the ISO C standard. any conflict between what's written here and the ISO C standard is unintentional β€” nobody's fighting, it's a collab. and this volume of POSIX.1‐2017 defers to the ISO C standard, so ISO C is the main character here πŸ‘‘.

so what does wcsncat() actually do? it shall append not more than n wide-character codes from the array pointed to by ws2 to the end of the wide-character string pointed to by ws1. and bestie, listen β€” a null wide-character code and the wide-character codes that follow it are not appended, so it stops at the null, periodt.

the initial wide-character code of ws2 shall overwrite the null wide-character code at the end of ws1. iconic, it just slides right in 🫢.

a terminating null wide-character code shall always be appended to the result. always. no exceptions.

⚠️ but lowkey important: if copying takes place between objects that overlap, the behavior is undefined. do not do that. that's the cursed path πŸ’€.

πŸ’œ RETURN VALUE πŸ’œ

wcsncat() shall return ws1. that's it, that's the whole return value. and no return value is reserved to indicate an error β€” so don't go looking for an error code, it's not there, she doesn't do that πŸ’….


🌈 ERRORS 🌈

No errors are defined. zero. none. she's unbothered, moisturized, in her lane ✨.

also, heads up: the following sections are informative β€” aka the chill, non-normative ones.


πŸ“ EXAMPLES πŸ“

None. πŸ™ˆ


πŸ’… APPLICATION USAGE πŸ’…

None. πŸ’…


⭐ RATIONALE ⭐

None. ⭐


🌸 FUTURE DIRECTIONS 🌸

None. 🌸


πŸ‘‘ SEE ALSO πŸ‘‘

  • wcscat()

also, from the Base Definitions volume of POSIX.1‐2017: <wchar.h> πŸ¦‹


so, legal moment, but make it cute:

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 in the event of any discrepancy between this version and the original IEEE and The Open Group Standard β€” bestie, 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 .


and that's the whole page, bestie πŸ₯ΉπŸ’– brought to you by IEEE/The Open Group, dated 2017 β€” WCSNCAT(3POSIX), signing off, slay 🌈✨