#include size_t strcspn(char const *s, char const *reject) { size_t i = 0; while(s[i] && !strchr(reject, s[i])) i++; return i; }