Category : C Source Code
Archive   : ECSTR.ZIP
Filename : STRPBRK.C

Output of file : STRPBRK.C contained in archive : ECSTR.ZIP
/* File : strpbrk.c
Author : Richard A. O'Keefe.
Updated: 11 April 1984
Defines: strpbrk()

strpbrk(s1, s2) returns NullS if no character of s2 occurs in s1, or
a pointer to the first character of s1 which occurs in s2 if there
is one. It generalises strchr (v7=index). It wouldn't be useful to
consider NUL as part of s2, as that would occur in every s1.

#include "strings.h"
#include "_str2set.h"

char *strpbrk(str, set)
register _char_ *str;
char *set;
while (_set_vec[*str] != _set_ctr)
if (!*str++) return NullS;
return str;

  3 Responses to “Category : C Source Code
Archive   : ECSTR.ZIP
Filename : STRPBRK.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: