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 __wmemchr(const wchar_t* dest, const wchar_t wc, size_t count) 11 { 12 while (count-- > 0) { 13 if (*dest == wc) 14 return (wchar_t*)dest; 15 ++dest; 16 } 17 18 return NULL; 19 } 20 21 22 B_DEFINE_WEAK_ALIAS(__wmemchr, wmemchr); 23