Debian Codegraph @

upstream/debian-unstable/man3/wcscspn.3

raw
1 '\" t
2 .\" Copyright, Bruno Haible <[email protected]>
3 .\" Copyright, the authors of the Linux man-pages project
4 .\"
5 .\" SPDX-License-Identifier: GPL-2.0-or-later
6 .\"
7 .TH wcscspn 3 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 wcscspn \- search a wide-character string for any of a set of wide characters
10 .SH LIBRARY
11 Standard C library
12 .RI ( libc ,\~ \-lc )
13 .SH SYNOPSIS
14 .nf
15 .B #include <wchar.h>
16 .P
17 .BI "size_t wcscspn(const wchar_t *" wcs ", const wchar_t *" reject );
18 .fi
19 .SH DESCRIPTION
20 The
21 .BR wcscspn ()
22 function is the wide-character equivalent
23 of the
24 .BR strcspn (3)
25 function.
26 It determines the length of the longest initial segment of
27 .I wcs
28 which consists entirely of wide-characters not listed in
29 .IR reject .
30 In
31 other words, it searches for the first occurrence in the wide-character
32 string
33 .I wcs
34 of any of the characters in the wide-character string
35 .IR reject .
36 .SH RETURN VALUE
37 The
38 .BR wcscspn ()
39 function returns the number of
40 wide characters in the longest
41 initial segment of
42 .I wcs
43 which consists entirely of wide-characters not
44 listed in
45 .IR reject .
46 In other words, it returns the position of the first
47 occurrence in the wide-character string
48 .I wcs
49 of any of the characters in
50 the wide-character string
51 .IR reject ,
52 or
53 .I wcslen(wcs)
54 if there is none.
55 .SH ATTRIBUTES
56 For an explanation of the terms used in this section, see
57 .BR attributes (7).
58 .TS
59 allbox;
60 lbx lb lb
61 l l l.
62 Interface Attribute Value
63 T{
64 .na
65 .nh
66 .BR wcscspn ()
67 T} Thread safety MT-Safe
68 .TE
69 .SH STANDARDS
70 C11, POSIX.1-2008.
71 .SH HISTORY
72 POSIX.1-2001, C99.
73 .SH SEE ALSO
74 .BR strcspn (3),
75 .BR wcspbrk (3),
76 .BR wcsspn (3)