man strpbrk.3
man strchrnul.3
strpbrknul
locates the first occurrence in the string s
of any of the bytes in the string accept
, or a pointer to the null byte at the end of s
if no such byte is found.
#include <string.h>
const char* strpbrknul(const char* s, const char* accept){
for(; *s; ++s)
if(strchr(accept, *s)) return s;
return s;
}
// TODO: Replace examples and use TDD by writing your own tests. The code provided here is just a how-to example.
#include <criterion/criterion.h>
// replace with the actual method being tested
const char* strpbrknul(const char*, const char*);
Test(the_multiply_function, should_pass_all_the_tests_provided) {}