WCSCHR(3POSIX)

πŸ’– WCSCHR β€” the wide-character string scanning situation πŸ’–

okay bestie, we're reading the POSIX Programmer's Manual page for wcschr, and honestly? it's a whole vibe. short, sweet, iconic. let's get into it ✨


πŸŽ€ PROLOG

so like, real talk first 🫢 this manual page is part of the POSIX Programmer's Manual. that means the Linux version of this interface might act different (so go check the matching Linux manual page for the deets on Linux behavior), or honestly it might just not be implemented on Linux at all. no cap. πŸ’€


🌸 NAME

wcschr β€” wide-character string scanning operation. she scans. that's the job. πŸ‘‘


✨ SYNOPSIS

#include <wchar.h>

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

πŸ¦‹ DESCRIPTION

okay so the functionality on this reference page is aligned with the ISO C standard. if anything here conflicts with the ISO C standard, that was not intentional, fr fr. this volume of POSIX.1‐2017 defers to the ISO C standard. periodt.

so what does wcschr() actually do? she shall locate the first occurrence of wc in the wide-character string pointed to by ws. πŸ”

and here's the part where you have to hold up your end of the deal, bestie: 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. that's on you. 😭

oh and the terminating null wide-character code? yeah, she's considered to be part of the wide-character string. so don't act surprised when she shows up. πŸ’…


🫢 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. that's it. that's the whole return value arc. 🌈


πŸ’œ ERRORS

no errors are defined. like, none. zero. iconic behavior honestly. ✨

the following sections are informative (iykyk):


πŸ“ EXAMPLES

none. πŸ™ˆ


🧚 APPLICATION USAGE

none. πŸŽ€


⭐ RATIONALE

none. πŸ¦‹


🌸 FUTURE DIRECTIONS

none. πŸ’–


πŸ”₯ SEE ALSO

  • wcsrchr()
  • 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. πŸ“œ

so if there's 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. she's the final boss, not this page. the original Standard can be obtained online at http://www.opengroup.org/unix/online.html .

any typographical or formatting errors that show up in this page are most likely from the conversion of the source files into man page format (not me, not you, not the standard β€” the conversion 😭). to report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .


and that's the whole page bestie!! shoutout IEEE/The Open Group for putting this together back in 2017 β€” the source of this whole masterpiece, mwah πŸ’…πŸ«Άβœ¨