1wcsstr(3)                  Library Functions Manual                  wcsstr(3)
2
3
4

NAME

6       wcsstr - locate a substring in a wide-character string
7

LIBRARY

9       Standard C library (libc, -lc)
10

SYNOPSIS

12       #include <wchar.h>
13
14       wchar_t *wcsstr(const wchar_t *haystack, const wchar_t *needle);
15

DESCRIPTION

17       The wcsstr() function is the wide-character equivalent of the strstr(3)
18       function.  It searches for the first occurrence of  the  wide-character
19       string  needle (without its terminating null wide character (L'\0')) as
20       a substring in the wide-character string haystack.
21

RETURN VALUE

23       The wcsstr() function returns a pointer to the first occurrence of nee‐
24       dle  in  haystack.   It returns NULL if needle does not occur as a sub‐
25       string in haystack.
26
27       Note the special case: If needle is the  empty  wide-character  string,
28       the return value is always haystack itself.
29

ATTRIBUTES

31       For  an  explanation  of  the  terms  used  in  this  section,  see at‐
32       tributes(7).
33
34       ┌────────────────────────────────────────────┬───────────────┬─────────┐
35Interface                                   Attribute     Value   
36       ├────────────────────────────────────────────┼───────────────┼─────────┤
37wcsstr()                                    │ Thread safety │ MT-Safe │
38       └────────────────────────────────────────────┴───────────────┴─────────┘
39

STANDARDS

41       C11, POSIX.1-2008.
42

HISTORY

44       POSIX.1-2001, C99.
45

SEE ALSO

47       strstr(3), wcschr(3)
48
49
50
51Linux man-pages 6.05              2023-07-20                         wcsstr(3)
Impressum