WCSNCMP(3P)

πŸ’– WCSNCMP(3P) β€” the wide-char glow-up πŸ’–

okay bestie, so this one's from the POSIX Programmer's Manual (yes, the 3P manual, we love a section suffix) πŸŽ€

🚨 PROLOG

This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ β€” so like, go consult the corresponding Linux manual page for the tea on Linux behavior πŸ«– β€” or the interface may not be implemented on Linux at all. Not every baddie shows up to every party, iykyk.


✨ 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 🌸

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 β€” like, no beef, it's giving accidental. 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 (and wide-character codes that follow a null wide-character code are not compared, okay? don't come for me) from the array pointed to by ws1 to the array pointed to by ws2. πŸ’–

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. First difference wins, no cap. πŸ‘‘

πŸŽ€ RETURN VALUE πŸŽ€

Upon successful completion, wcsncmp() shall return an integer:

  • greater than 0 if the possibly null-terminated array pointed to by ws1 is greater than the possibly null-terminated array pointed to by ws2 πŸ”₯
  • equal to 0 if they're equal β€” matching energy, we love to see it 🌈
  • less than 0 if the ws1 array is less than the ws2 array πŸ’œ

πŸ’€ ERRORS πŸ’€

No errors are defined. She simply does not have problems. Iconic behavior honestly.

The following sections are informative. (aka, the vibes-only sections, not the rules-are-rules sections 🧚)

πŸ“ EXAMPLES πŸ“

None. (Yeah, I know. Nothing to show. We're all just out here trusting the process πŸ™ˆ)

πŸ’œ APPLICATION USAGE πŸ’œ

None. (Also nothing. Two sections of pure silence, and honestly? slay.)

⭐ RATIONALE ⭐

None.

πŸ¦‹ FUTURE DIRECTIONS πŸ¦‹

None. The future is bright and this function is staying exactly as she is ✨

πŸ‘‘ SEE ALSO πŸ‘‘

  • wcscasecmp()
  • wcscmp()

The Base Definitions volume of POSIX.1‐2017, <wchar.h> β€” go read her, she's the main character of the includes fr fr πŸ“š


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 β€” that's the one holding the whistle, bestie, don't @ me. 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 . If you spot one, tell the maintainers, not me, I'm just the messenger 🫢


mwah, that's the whole page, we ate and left no crumbs πŸ’…βœ¨ This edition came to you from IEEE/The Open Group, dated 2017, filed under WCSNCMP(3P). bye bestie, go compare some wide-character strings responsibly πŸŒΈπŸŽ€

πŸ“¦ where this page comes from