WCSSPN(3POSIX)
๐ WCSSPN(3POSIX) ๐
okay so bestie, welcome to the POSIX Programmer's Manual, the WCSSPN(3POSIX) page specifically, and she is a tiny little queen with a big job ๐
๐จ PROLOG ๐จ
so like, real talk first. this manual page is part of the POSIX Programmer's Manual. but heads up: 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. vibe check accordingly ๐
โจ 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 ๐
okay so the functionality described on this reference page is aligned with the ISO C standard. and like, any conflict between the requirements described here and the ISO C standard? unintentional, fr fr. this volume of POSIX.1โ2017 defers to the ISO C standard. periodt.
now the actual tea โ the wcsspn() function 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.
it's giving "how far can ws1 walk while every single step is still in ws2's guest list" ๐ซถ
๐ RETURN VALUE ๐
the wcsspn() function shall return the length of the initial substring of ws1.
and listen: no return value is reserved to indicate an error. none. zero. she does not do error signals. ๐ญ
๐ซ ERRORS ๐ซ
No errors are defined.
(the following sections are informative, so they're the fun bonus content ๐)
๐ธ EXAMPLES ๐ธ
None.
(not a single example, the page said rest ๐)
๐ APPLICATION USAGE ๐
None.
๐ง RATIONALE ๐ง
None.
๐ฎ FUTURE DIRECTIONS ๐ฎ
None.
๐ SEE ALSO ๐
wcscspn()- The Base Definitions volume of POSIX.1โ2017,
<wchar.h>
ยฉ๏ธ COPYRIGHT ยฉ๏ธ
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 spot a typo it's probably from the whole "converting source files to man page format" saga, not the standard itself. report it at that kernel.org link, king behavior ๐
and that's the whole page bestie!! this icon dropped in 2017 courtesy of IEEE/The Open Group, and honestly? she ate. ๐โจ๐๐ฆ๐๐ ๐โญ
๐ฆ where this page comes from
- debian bookworm: manpages-posix-dev 2017a-2 ยท Other
- debian trixie: manpages-posix-dev 2017a-2 ยท Other
- ubuntu jammy: manpages-posix-dev 2017a-2 ยท Other
- ubuntu noble: manpages-posix-dev 2017a-2 ยท Other
- ubuntu resolute: manpages-posix-dev 2017a-2build1 ยท Other
- ubuntu stonking: manpages-posix-dev 2017a-2.1 ยท Other
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms