diff options
Diffstat (limited to 'usr/klibc/strpbrk.c')
-rw-r--r-- | usr/klibc/strpbrk.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/usr/klibc/strpbrk.c b/usr/klibc/strpbrk.c new file mode 100644 index 0000000..300dbba --- /dev/null +++ b/usr/klibc/strpbrk.c @@ -0,0 +1,14 @@ +/* + * strpbrk + */ + +#include <string.h> + +#include "strxspn.h" + +char *strpbrk(const char *s, const char *accept) +{ + const char *ss = s + __strxspn(s, accept, 1); + + return *ss ? (char *)ss : NULL; +} |