WCSNCMP(3POSIX)

🌸 PROLOG 🌸

okay bestie, real talk before we even start: 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 just not be implemented on Linux at all. πŸ’€


✨ NAME ✨

wcsncmp β€” compare part of two wide-character strings πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

#include <wchar.h>

int wcsncmp(const wchar_t *ws1, const wchar_t *ws2, size_t n);

πŸ’– DESCRIPTION πŸ’–

So 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 β€” nobody's trying to start drama. This volume of POSIX.1-2017 defers to the ISO C standard. periodt.

The wcsncmp() function shall compare not more than n wide-character codes from the array pointed to by ws1 to the array pointed to by ws2. And listen β€” wide-character codes that follow a null wide-character code are not compared. like, they're off the guest list. 🚫

The sign of a non-zero return value shall be determined by the sign of the difference between the values of the first pair of wide-character codes that differ in the objects being compared. it's giving "first disagreement wins." πŸ‘‘


🌈 RETURN VALUE 🌈

Upon successful completion, wcsncmp() shall return an integer greater than, equal to, or less than 0, if the possibly null-terminated array pointed to by ws1 is greater than, equal to, or less than the possibly null-terminated array pointed to by ws2, respectively. three moods, three outcomes, slay. πŸ’…


πŸ“ ERRORS πŸ“

No errors are defined. literally none. it's that unproblematic. πŸ™ˆ

The following sections are informative. (yes bestie, everything after this is just ✨lore✨)


🧚 EXAMPLES 🧚

None.


πŸ’œ APPLICATION USAGE πŸ’œ

None.


⭐ RATIONALE ⭐

None.


πŸ¦‹ FUTURE DIRECTIONS πŸ¦‹

None.


πŸ”₯ SEE ALSO πŸ”₯

  • wcscasecmp()
  • wcscmp()

The Base Definitions volume of POSIX.1-2017, <wchar.h>


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. (read: the original is the main character, this page is just the bestie hyping it up.)

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 notes, 10/10, no cap. πŸ’–

mwah, bye bestie β€” this one's brought to you by IEEE/The Open Group, 2017, and it lives under the name WCSNCMP(3POSIX). πŸŽ€βœ¨