]> git.ipfire.org Git - thirdparty/glibc.git/blame - wcsmbs/wcschr.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / wcsmbs / wcschr.c
CommitLineData
04277e02 1/* Copyright (C) 1995-2019 Free Software Foundation, Inc.
6d52618b 2 This file is part of the GNU C Library.
a482b5a5 3
6d52618b 4 The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
a482b5a5 8
6d52618b
UD
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 12 Lesser General Public License for more details.
a482b5a5 13
41bdb6e2 14 You should have received a copy of the GNU Lesser General Public
59ba27a6
PE
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
a482b5a5 17
299a95b9 18#include <wchar.h>
a482b5a5 19
fb78612a
AZ
20#ifndef WCSCHR
21# define WCSCHR __wcschr
1d3e4b61
UD
22#endif
23
fb78612a 24/* Find the first occurrence of WC in WCS. */
a482b5a5 25wchar_t *
fb78612a 26WCSCHR (const wchar_t *wcs, const wchar_t wc)
a482b5a5 27{
1cda411d 28 do
a482b5a5
RM
29 if (*wcs == wc)
30 return (wchar_t *) wcs;
c5f57c58 31 while (*wcs++ != L'\0');
a482b5a5
RM
32
33 return NULL;
34}
fb78612a 35libc_hidden_def (__wcschr)
2cfbdb9a
JM
36weak_alias (__wcschr, wcschr)
37libc_hidden_weak (wcschr)