1wcsspn(3) Library Functions Manual wcsspn(3)
2
3
4
6 wcsspn - get length of a prefix wide-character substring
7
9 Standard C library (libc, -lc)
10
12 #include <wchar.h>
13
14 size_t wcsspn(const wchar_t *wcs, const wchar_t *accept);
15
17 The wcsspn() function is the wide-character equivalent of the strspn(3)
18 function. It determines the length of the longest initial segment of
19 wcs which consists entirely of wide-characters listed in accept. In
20 other words, it searches for the first occurrence in the wide-character
21 string wcs of a wide-character not contained in the wide-character
22 string accept.
23
25 The wcsspn() function returns the number of wide characters in the
26 longest initial segment of wcs which consists entirely of wide-charac‐
27 ters listed in accept. In other words, it returns the position of the
28 first occurrence in the wide-character string wcs of a wide-character
29 not contained in the wide-character string accept, or wcslen(wcs) if
30 there is none.
31
33 For an explanation of the terms used in this section, see at‐
34 tributes(7).
35
36 ┌────────────────────────────────────────────┬───────────────┬─────────┐
37 │Interface │ Attribute │ Value │
38 ├────────────────────────────────────────────┼───────────────┼─────────┤
39 │wcsspn() │ Thread safety │ MT-Safe │
40 └────────────────────────────────────────────┴───────────────┴─────────┘
41
43 C11, POSIX.1-2008.
44
46 POSIX.1-2001, C99.
47
49 strspn(3), wcscspn(3)
50
51
52
53Linux man-pages 6.04 2023-03-30 wcsspn(3)