]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/wcsstr.3
All pages: Remove the 5th argument to .TH
[thirdparty/man-pages.git] / man3 / wcsstr.3
1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2 .\"
3 .\" SPDX-License-Identifier: GPL-2.0-or-later
4 .\"
5 .\" References consulted:
6 .\" GNU glibc-2 source code and manual
7 .\" Dinkumware C library reference http://www.dinkumware.com/
8 .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
9 .\" ISO/IEC 9899:1999
10 .\"
11 .TH WCSSTR 3 2021-03-22 "Linux man-pages (unreleased)"
12 .SH NAME
13 wcsstr \- locate a substring in a wide-character string
14 .SH LIBRARY
15 Standard C library
16 .RI ( libc ", " \-lc )
17 .SH SYNOPSIS
18 .nf
19 .B #include <wchar.h>
20 .PP
21 .BI "wchar_t *wcsstr(const wchar_t *" haystack ", const wchar_t *" needle );
22 .fi
23 .SH DESCRIPTION
24 The
25 .BR wcsstr ()
26 function is the wide-character equivalent of the
27 .BR strstr (3)
28 function.
29 It searches for the first occurrence of the wide-character string
30 .I needle
31 (without its terminating null wide character (L\(aq\e0\(aq))
32 as a substring in the wide-character string
33 .IR haystack .
34 .SH RETURN VALUE
35 The
36 .BR wcsstr ()
37 function returns a pointer to the first occurrence of
38 .I needle
39 in
40 .IR haystack .
41 It returns NULL if
42 .I needle
43 does not occur
44 as a substring in
45 .IR haystack .
46 .PP
47 Note the special case:
48 If
49 .I needle
50 is the empty wide-character string,
51 the return value is always
52 .I haystack
53 itself.
54 .SH ATTRIBUTES
55 For an explanation of the terms used in this section, see
56 .BR attributes (7).
57 .ad l
58 .nh
59 .TS
60 allbox;
61 lbx lb lb
62 l l l.
63 Interface Attribute Value
64 T{
65 .BR wcsstr ()
66 T} Thread safety MT-Safe
67 .TE
68 .hy
69 .ad
70 .sp 1
71 .SH STANDARDS
72 POSIX.1-2001, POSIX.1-2008, C99.
73 .SH SEE ALSO
74 .BR strstr (3),
75 .BR wcschr (3)