malloc_get_state.3: tfix
[man-pages.git] / man3 / wcscspn.3
bloba545782787b5b41980006ef56ac9ab54e883cbd2
1 '\" t
2 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
3 .\"
4 .\" SPDX-License-Identifier: GPL-2.0-or-later
5 .\"
6 .\" References consulted:
7 .\"   GNU glibc-2 source code and manual
8 .\"   Dinkumware C library reference http://www.dinkumware.com/
9 .\"   OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
10 .\"   ISO/IEC 9899:1999
11 .\"
12 .TH wcscspn 3 (date) "Linux man-pages (unreleased)"
13 .SH NAME
14 wcscspn \- search a wide-character string for any of a set of wide characters
15 .SH LIBRARY
16 Standard C library
17 .RI ( libc ", " \-lc )
18 .SH SYNOPSIS
19 .nf
20 .B #include <wchar.h>
22 .BI "size_t wcscspn(const wchar_t *" wcs ", const wchar_t *" reject );
23 .fi
24 .SH DESCRIPTION
25 The
26 .BR wcscspn ()
27 function is the wide-character equivalent
28 of the
29 .BR strcspn (3)
30 function.
31 It determines the length of the longest initial segment of
32 .I wcs
33 which consists entirely of wide-characters not listed in
34 .IR reject .
36 other words, it searches for the first occurrence in the wide-character
37 string
38 .I wcs
39 of any of the characters in the wide-character string
40 .IR reject .
41 .SH RETURN VALUE
42 The
43 .BR wcscspn ()
44 function returns the number of
45 wide characters in the longest
46 initial segment of
47 .I wcs
48 which consists entirely of wide-characters not
49 listed in
50 .IR reject .
51 In other words, it returns the position of the first
52 occurrence in the wide-character string
53 .I wcs
54 of any of the characters in
55 the wide-character string
56 .IR reject ,
58 .I wcslen(wcs)
59 if there is none.
60 .SH ATTRIBUTES
61 For an explanation of the terms used in this section, see
62 .BR attributes (7).
63 .TS
64 allbox;
65 lbx lb lb
66 l l l.
67 Interface       Attribute       Value
69 .na
70 .nh
71 .BR wcscspn ()
72 T}      Thread safety   MT-Safe
73 .TE
74 .SH STANDARDS
75 C11, POSIX.1-2008.
76 .SH HISTORY
77 POSIX.1-2001, C99.
78 .SH SEE ALSO
79 .BR strcspn (3),
80 .BR wcspbrk (3),
81 .BR wcsspn (3)