Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenstrxspn.h
Go to the documentation of this file.
00001 /* $Id: strxspn.h 30291 2007-11-09 12:20:16Z fireball $ 00002 */ 00003 00004 #include <limits.h> 00005 #include <string.h> 00006 00007 size_t _strxspn(const char *s1, const char *s2) 00008 { 00009 unsigned char char_map[1 << CHAR_BIT * sizeof(char)]; 00010 const unsigned char * us2 = (const unsigned char *)s2; 00011 const unsigned char * str = (const unsigned char *)s1; 00012 00013 memset(char_map, 0, sizeof(char_map)); 00014 00015 for(; *us2; ++ us2) 00016 char_map[*us2 / CHAR_BIT] |= (1 << (*us2 % CHAR_BIT)); 00017 00018 for(; *str; ++ str) 00019 if(_x(char_map[*str / CHAR_BIT] & (1 << (*str % CHAR_BIT)))) break; 00020 00021 return (size_t)str - (size_t)s1; 00022 } 00023 00024 /* EOF */ Generated on Sat May 26 2012 04:35:36 for ReactOS by
1.7.6.1
|