1 // 2 // wcspbrk.cpp 3 // 4 // Copyright (c) Microsoft Corporation. All rights reserved. 5 // 6 // Defines wcspbrk(), which returns a pointer to the first wide character in 7 // 'string' that is in the 'control'. 8 // 9 #include <string.h> 10 11 12 13 extern "C" wchar_t const* __cdecl wcspbrk( 14 wchar_t const* const string, 15 wchar_t const* const control 16 ) 17 { 18 for (wchar_t const* string_it = string; *string_it; ++string_it) 19 { 20 for (wchar_t const* control_it = control; *control_it; ++control_it) 21 { 22 if (*control_it == *string_it) 23 { 24 return string_it; 25 } 26 } 27 } 28 29 return nullptr; 30 } 31