ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

strxspn.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 doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.