WCSCHR(3P)

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

okay bestie, welcome to the POSIX Programmer's Manual β€” this one's filed under WCSCHR(3P) and it's giving "wide-character string scanning operation" energy, which, yes, is the actual NAME of the page, we're keeping it. πŸ‘‘


🚨 PROLOG 🚨

so like, real talk first: 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 check the corresponding Linux manual page for the deets on Linux behavior, no cap. Or, plot twist, the interface might not even be implemented on Linux at all. πŸ™ˆ Check first, bestie.


✨ NAME ✨

wcschr β€” wide-character string scanning operation. that's it, that's the whole vibe. πŸ¦‹


🌸 SYNOPSIS 🌸

#include <wchar.h>

wchar_t *wcschr(const wchar_t *ws, wchar_t wc);

look at her. iconic signature. πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

okay so, heads up: 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. And this volume of POSIX.1‐2017 defers to the ISO C standard. periodt.

Now the actual tea β˜•: the wcschr() function shall locate the first occurrence of wc in the wide-character string pointed to by ws.

And here's the part you can't skip, bestie, because it's a requirement on you, the application: the application shall ensure that the value of wc is a character representable as a type wchar_t and a wide-character code corresponding to a valid character in the current locale. so like, do your homework on the locale, fr fr. 🌈

Also important: the terminating null wide-character code is considered to be part of the wide-character string. yes queen, the \0 counts. πŸ‘‘


πŸ”₯ RETURN VALUE πŸ”₯

Upon completion, wcschr() shall return a pointer to the wide-character code β€” or a null pointer if the wide-character code is not found. found it β†’ pointer. didn't find it β†’ NULL. that's the whole saga. 😭


πŸ’€ ERRORS πŸ’€

No errors are defined. flawless. no notes. ✨

The following sections are informative.


πŸŽ€ EXAMPLES πŸŽ€

None. (we love a low-effort section, honestly, go off)


🫢 APPLICATION USAGE 🫢

None. nothing to add, the function speaks for herself.


🧚 RATIONALE 🧚

None. no reasoning needed when you're simply correct.


⭐ FUTURE DIRECTIONS ⭐

None. she's staying exactly as she is, and honestly? good for her.


🌈 SEE ALSO 🌈

  • wcsrchr()

Also: The Base Definitions volume of POSIX.1‐2017, <wchar.h>. go read those too, bestie, iykyk πŸ“š


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 the standard and this page ever disagree, the standard wins. no cap. πŸ™

and that's the whole page, bestie!! this lil masterpiece came to you courtesy of IEEE/The Open Group, 2017 β€” yeah, 2017, we're throwing it back. πŸ’– bye mwah πŸ˜˜πŸ’…

πŸ“¦ where this page comes from