반응형
void *memchr(const void *s, int c, size_t n);
void *memchr(const void *s, int c, size_t n) { unsigned char *p = (unsigned char*)s; while( n-- ) if( *p != (unsigned char)c ) p++; else return p; return 0; }
반응형
void *memchr(const void *s, int c, size_t n);
void *memchr(const void *s, int c, size_t n) { unsigned char *p = (unsigned char*)s; while( n-- ) if( *p != (unsigned char)c ) p++; else return p; return 0; }