]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/wcsspn.3
man*/: ffix (un-bracket tables)
[thirdparty/man-pages.git] / man3 / wcsspn.3
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 wcsspn 3 (date) "Linux man-pages (unreleased)"
13 .SH NAME
14 wcsspn \- get length of a prefix wide-character substring
15 .SH LIBRARY
16 Standard C library
17 .RI ( libc ", " \-lc )
18 .SH SYNOPSIS
19 .nf
20 .B #include <wchar.h>
21 .PP
22 .BI "size_t wcsspn(const wchar_t *" wcs ", const wchar_t *" accept );
23 .fi
24 .SH DESCRIPTION
25 The
26 .BR wcsspn ()
27 function is the wide-character equivalent of the
28 .BR strspn (3)
29 function.
30 It determines the length of the longest initial segment of
31 .I wcs
32 which consists entirely of wide-characters listed in
33 .IR accept .
34 In other
35 words, it searches for the first occurrence in the wide-character string
36 .I wcs
37 of a wide-character not contained in the wide-character string
38 .IR accept .
39 .SH RETURN VALUE
40 The
41 .BR wcsspn ()
42 function returns the number of
43 wide characters in the longest
44 initial segment of
45 .I wcs
46 which consists entirely of wide-characters listed
47 in
48 .IR accept .
49 In other words, it returns the position of the first
50 occurrence in the wide-character string
51 .I wcs
52 of a wide-character not
53 contained in the wide-character string
54 .IR accept ,
55 or
56 .I wcslen(wcs)
57 if there is none.
58 .SH ATTRIBUTES
59 For an explanation of the terms used in this section, see
60 .BR attributes (7).
61 .TS
62 allbox;
63 lbx lb lb
64 l l l.
65 Interface Attribute Value
66 T{
67 .na
68 .nh
69 .BR wcsspn ()
70 T} Thread safety MT-Safe
71 .TE
72 .sp 1
73 .SH STANDARDS
74 C11, POSIX.1-2008.
75 .SH HISTORY
76 POSIX.1-2001, C99.
77 .SH SEE ALSO
78 .BR strspn (3),
79 .BR wcscspn (3)