xref: /haiku/src/system/libroot/posix/wchar/wcspbrk.c (revision 02354704729d38c3b078c696adc1bbbd33cbcf72)
1 /*
2 ** Copyright 2011, Oliver Tappe, zooey@hirschkaefer.de. All rights reserved.
3 ** Distributed under the terms of the MIT License.
4 */
5 
6 #include <wchar_private.h>
7 
8 
9 wchar_t*
10 __wcspbrk(const wchar_t* wcs, const wchar_t* acceptIn)
11 {
12 	for (; *wcs != L'\0'; ++wcs) {
13 		const wchar_t* accept = acceptIn;
14 		for (; *accept != L'\0'; ++accept) {
15 			if (*accept == *wcs)
16 				return (wchar_t*)wcs;
17 		}
18 	}
19 
20 	return NULL;
21 }
22 
23 
24 B_DEFINE_WEAK_ALIAS(__wcspbrk, wcspbrk);
25