xref: /freebsd/lib/libc/string/wmemchr.3 (revision 397e83df75e0fcd0d3fcb95ae4d794cb7600fc89)
1.\"	$NetBSD: wmemchr.3,v 1.4 2001/01/02 11:26:23 itojun Exp $
2.\"
3.\" Copyright (c) 1990, 1991, 1993
4.\"	The Regents of the University of California.  All rights reserved.
5.\"
6.\" This code is derived from software contributed to Berkeley by
7.\" Chris Torek and the American National Standards Committee X3,
8.\" on Information Processing Systems.
9.\"
10.\" Redistribution and use in source and binary forms, with or without
11.\" modification, are permitted provided that the following conditions
12.\" are met:
13.\" 1. Redistributions of source code must retain the above copyright
14.\"    notice, this list of conditions and the following disclaimer.
15.\" 2. Redistributions in binary form must reproduce the above copyright
16.\"    notice, this list of conditions and the following disclaimer in the
17.\"    documentation and/or other materials provided with the distribution.
18.\" 3. Neither the name of the University nor the names of its contributors
19.\"    may be used to endorse or promote products derived from this software
20.\"    without specific prior written permission.
21.\"
22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32.\" SUCH DAMAGE.
33.\"
34.Dd March 21, 2024
35.Dt WMEMCHR 3
36.Os
37.Sh NAME
38.Nm wmemchr ,
39.Nm wmemcmp ,
40.Nm wmemcpy ,
41.Nm wmemmove ,
42.Nm wmempcpy ,
43.Nm wmemset ,
44.Nm wcpcpy ,
45.Nm wcpncpy ,
46.Nm wcscasecmp ,
47.Nm wcscat ,
48.Nm wcschr ,
49.Nm wcscmp ,
50.Nm wcscpy ,
51.Nm wcscspn ,
52.Nm wcsdup ,
53.Nm wcslcat ,
54.Nm wcslcpy ,
55.Nm wcslen ,
56.Nm wcsncasecmp ,
57.Nm wcsncat ,
58.Nm wcsncmp ,
59.Nm wcsncpy ,
60.Nm wcsnlen ,
61.Nm wcspbrk ,
62.Nm wcsrchr ,
63.Nm wcsspn ,
64.Nm wcsstr
65.Nd wide character string manipulation operations
66.Sh LIBRARY
67.Lb libc
68.Sh SYNOPSIS
69.In wchar.h
70.Ft wchar_t *
71.Fn wmemchr "const wchar_t *s" "wchar_t c" "size_t n"
72.Ft int
73.Fn wmemcmp "const wchar_t *s1" "const wchar_t *s2" "size_t n"
74.Ft wchar_t *
75.Fn wmemcpy "wchar_t * restrict s1" "const wchar_t * restrict s2" "size_t n"
76.Ft wchar_t *
77.Fn wmemmove "wchar_t *s1" "const wchar_t *s2" "size_t n"
78.Ft wchar_t *
79.Fn wmempcpy "wchar_t * restrict s1" "const wchar_t * restrict s2" "size_t n"
80.Ft wchar_t *
81.Fn wmemset "wchar_t *s" "wchar_t c" "size_t n"
82.Ft wchar_t *
83.Fn wcpcpy "wchar_t * restrict s1" "const wchar_t * restrict s2"
84.Ft wchar_t *
85.Fn wcpncpy "wchar_t * restrict s1" "const wchar_t * restrict s2" "size_t n"
86.Ft int
87.Fn wcscasecmp "const wchar_t *s1" "const wchar_t *s2"
88.Ft wchar_t *
89.Fn wcscat "wchar_t * restrict s1" "const wchar_t * restrict s2"
90.Ft wchar_t *
91.Fn wcschr "const wchar_t *s" "wchar_t c"
92.Ft int
93.Fn wcscmp "const wchar_t *s1" "const wchar_t *s2"
94.Ft wchar_t *
95.Fn wcscpy "wchar_t * restrict s1" "const wchar_t * restrict s2"
96.Ft size_t
97.Fn wcscspn "const wchar_t *s1" "const wchar_t *s2"
98.Ft wchar_t *
99.Fn wcsdup "const wchar_t *s"
100.Ft size_t
101.Fn wcslcat "wchar_t *s1" "const wchar_t *s2" "size_t n"
102.Ft size_t
103.Fn wcslcpy "wchar_t *s1" "const wchar_t *s2" "size_t n"
104.Ft size_t
105.Fn wcslen "const wchar_t *s"
106.Ft int
107.Fn wcsncasecmp "const wchar_t *s1" "const wchar_t *s2" "size_t n"
108.Ft wchar_t *
109.Fn wcsncat "wchar_t * restrict s1" "const wchar_t * restrict s2" "size_t n"
110.Ft int
111.Fn wcsncmp "const wchar_t *s1" "const wchar_t * s2" "size_t n"
112.Ft wchar_t *
113.Fn wcsncpy "wchar_t * restrict s1" "const wchar_t * restrict s2" "size_t n"
114.Ft size_t
115.Fn wcsnlen "const wchar_t *s" "size_t maxlen"
116.Ft wchar_t *
117.Fn wcspbrk "const wchar_t *s1" "const wchar_t *s2"
118.Ft wchar_t *
119.Fn wcsrchr "const wchar_t *s" "wchar_t c"
120.Ft size_t
121.Fn wcsspn "const wchar_t *s1" "const wchar_t *s2"
122.Ft wchar_t *
123.Fn wcsstr "const wchar_t * restrict s1" "const wchar_t * restrict s2"
124.Sh DESCRIPTION
125The functions implement string manipulation operations over wide character
126strings.
127For a detailed description, refer to documents for the respective single-byte
128counterpart, such as
129.Xr memchr 3 .
130.Sh SEE ALSO
131.Xr memchr 3 ,
132.Xr memcmp 3 ,
133.Xr memcpy 3 ,
134.Xr memmove 3 ,
135.Xr memset 3 ,
136.Xr stpcpy 3 ,
137.Xr stpncpy 3 ,
138.Xr strcasecmp 3 ,
139.Xr strcat 3 ,
140.Xr strchr 3 ,
141.Xr strcmp 3 ,
142.Xr strcpy 3 ,
143.Xr strcspn 3 ,
144.Xr strdup 3 ,
145.Xr strlcat 3 ,
146.Xr strlcpy 3 ,
147.Xr strlen 3 ,
148.Xr strncat 3 ,
149.Xr strncmp 3 ,
150.Xr strncpy 3 ,
151.Xr strnlen 3 ,
152.Xr strpbrk 3 ,
153.Xr strrchr 3 ,
154.Xr strspn 3 ,
155.Xr strstr 3
156.Sh STANDARDS
157These functions conform to
158.St -isoC-99 ,
159with the exception of
160.Fn wcpcpy ,
161.Fn wcpncpy ,
162.Fn wcscasecmp ,
163.Fn wcsdup ,
164.Fn wcsncasecmp ,
165and
166.Fn wcsnlen ,
167which conform to
168.St -p1003.1-2008 ;
169and
170.Fn wcslcat ,
171.Fn wcslcpy ,
172and
173.Fn wmempcpy ,
174which are extensions.
175