55 static const unsigned long mask01 = 0x01010101;
56 static const unsigned long mask80 = 0x80808080;
58 static const unsigned long mask01 = 0x0101010101010101;
59 static const unsigned long mask80 = 0x8080808080808080;
61 #error Unsupported word size 64 #define LONGPTR_MASK (sizeof(long) - 1) 74 return ((uintptr_t)p - (uintptr_t)str + x); \ 80 const unsigned long* lp;
87 return ((uintptr_t)p - (uintptr_t)str);
93 for(lp = (
const unsigned long*)(
const void*)p;; lp++)
95 if((*lp - mask01) & mask80)
97 p = (
const char*)(lp);
size_t strlen(const char *str)
Returns the length of the given null-terminated byte string.