WCSNRTOMBS(3P)

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

okay bestie, so this is a page from the POSIX Programmer's Manual (yes, the whole POSIX manual, we're fancy here πŸ’…). Heads up though: the Linux implementation of this interface may differ, so like, go check the corresponding Linux manual page for the deets on Linux behavior. Or honestly? The interface might not even be implemented on Linux at all. Vibe check accordingly. 🫢


✨ PROLOG ✨

so real talk: this manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ β€” so please, for the love of everything, consult the corresponding Linux manual page for details of Linux behavior. Also possible: the interface just straight up isn't implemented on Linux. Not every slay is universal, yk? πŸ’€


🌸 NAME 🌸

wcsnrtombs β€” convert wide-character string to multi-byte string

like it literally takes your wide chars and turns them into multi-byte ones. glow-up, but for characters. ✨


πŸŽ€ SYNOPSIS πŸŽ€

#include <wchar.h>

size_t wcsnrtombs(char *restrict dst, const wchar_t **restrict src,
    size_t nwc, size_t len, mbstate_t *restrict ps);

look at her. restrict twice, she's so careful with her pointers. iconic. πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this one doesn't spill the tea itself β€” you gotta refer to wcsrtombs(). That's the main character; wcsnrtombs is the limited-edition version (the n is doing a lot of work, iykyk). 🌈


ngl, this part is the legal bit and we gotta keep it exactly, so here it is, no edits, no cap:

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 .

fr fr: if this page and the original Standard ever beef, the original Standard wins. no arguing with the referee document. πŸ™ˆ

and that's the whole page bestie!! πŸ’– brought to you by IEEE/The Open Group, dated 2017, and filed under WCSNRTOMBS(3P) β€” go forth and convert those wide characters, you absolute legend. πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from