1 /* 2 * COPYRIGHT: See COPYING in the top level directory 3 * PROJECT: ReactOS system libraries 4 * FILE: lib/sdk/crt/mbstring/mbsspn.c 5 * PURPOSE: 6 * PROGRAMER: 7 * UPDATE HISTORY: 8 * 05/30/08: Samuel Serapion adapted from PROJECT C Library 9 * 10 */ 11 12 #include <precomp.h> 13 #include <mbstring.h> 14 15 /* 16 * @implemented 17 */ 18 size_t _mbsspn (const unsigned char *str1, const unsigned char *str2) 19 { 20 int c; 21 const unsigned char *save = str1; 22 23 while ((c = _mbsnextc (str1))) { 24 25 if (_mbschr (str2, c) == 0) 26 break; 27 28 str1 = _mbsinc ((unsigned char *) str1); 29 30 } 31 32 return str1 - save; 33 } 34