]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/wcsstr.3
man*/: srcfix (Use .P instead of .PP or .LP)
[thirdparty/man-pages.git] / man3 / wcsstr.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 wcsstr 3 (date) "Linux man-pages (unreleased)"
13 .SH NAME
14 wcsstr \- locate a substring in a wide-character string
15 .SH LIBRARY
16 Standard C library
17 .RI ( libc ", " \-lc )
18 .SH SYNOPSIS
19 .nf
20 .B #include <wchar.h>
21 .P
22 .BI "wchar_t *wcsstr(const wchar_t *" haystack ", const wchar_t *" needle );
23 .fi
24 .SH DESCRIPTION
25 The
26 .BR wcsstr ()
27 function is the wide-character equivalent of the
28 .BR strstr (3)
29 function.
30 It searches for the first occurrence of the wide-character string
31 .I needle
32 (without its terminating null wide character (L\[aq]\e0\[aq]))
33 as a substring in the wide-character string
34 .IR haystack .
35 .SH RETURN VALUE
36 The
37 .BR wcsstr ()
38 function returns a pointer to the first occurrence of
39 .I needle
40 in
41 .IR haystack .
42 It returns NULL if
43 .I needle
44 does not occur
45 as a substring in
46 .IR haystack .
47 .P
48 Note the special case:
49 If
50 .I needle
51 is the empty wide-character string,
52 the return value is always
53 .I haystack
54 itself.
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 wcsstr ()
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 strstr (3),
75 .BR wcschr (3)