WCSSPN(3P)

πŸ’– WCSSPN(3P) β€” POSIX Programmer's Manual πŸ’–

okay bestie, so this is wcsspn from the POSIX Programmer's Manual, and we're gonna get you fluent in it, no cap. it's giving "tiny function, huge power." πŸ¦‹

🌸 PROLOG 🌸

real talk before we 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 details of Linux behavior, iykyk), or honestly the interface may not be implemented on Linux at all. πŸ’€


✨ NAME ✨

wcsspn β€” get the length of a wide substring


πŸŽ€ SYNOPSIS πŸŽ€

#include <wchar.h>

size_t wcsspn(const wchar_t *ws1, const wchar_t *ws2);

πŸ’… DESCRIPTION πŸ’…

so the functionality described on this reference page is aligned with the ISO C standard. if there's any conflict between the requirements described here and the ISO C standard, that conflict is unintentional, okay? this volume of POSIX.1‐2017 defers to the ISO C standard. periodt.

now the actual vibe: wcsspn() shall compute the length (in wide characters) of the maximum initial segment of the wide-character string pointed to by ws1 which consists entirely of wide-character codes from the wide-character string pointed to by ws2. 🫢

like, it walks along ws1 from the front, and the second it hits a character that is NOT in ws2, it stops and tells you how far it got. main character energy, honestly.


⭐ RETURN VALUE ⭐

wcsspn() shall return the length of the initial substring of ws1. and listen β€” no return value is reserved to indicate an error. so don't go looking for an error signal in there, bestie, it's not coming. πŸ™ˆ


πŸ’€ ERRORS πŸ’€

No errors are defined.

also heads up: the following sections are informative. (translation: they're lore, not law ✨)


🌈 EXAMPLES 🌈

None. (i know, i know. nothing to demo here. we move.)


🧚 APPLICATION USAGE 🧚

None. πŸŽ€


πŸ’œ RATIONALE πŸ’œ

None. the reasoning is simply that it slays. πŸ’…


πŸ”₯ FUTURE DIRECTIONS πŸ”₯

None. the future is bright and unchanged, bestie. ⭐


πŸ‘‘ SEE ALSO πŸ‘‘

  • wcscspn()
  • The Base Definitions volume of POSIX.1‐2017, <wchar.h>

okay this is the part where we give credit where credit is due, and it's important, so no skipping:

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 .


ngl if you got all the way here you're literally an icon. πŸ†

and that's the whole page, bestie β€” brought to you by IEEE/The Open Group, 2017, page WCSSPN(3P). mwah. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from