Category : C Source Code
Archive   : E_C_STR.ZIP
Filename : STRSPN.C

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

strspn(s1, s2) returns the length of the longest prefix of s1
consisting entirely of characters in s2. NUL is not considered to
be in s2, and _str2set will not include it in the set.
*/

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

int strspn(str, set)
register _char_ *str;
char *set;
{
register int L;

_str2set(set);
for (L = 0; _set_vec[*str++] == _set_ctr; L++) ;
return L;
}



  3 Responses to “Category : C Source Code
Archive   : E_C_STR.ZIP
Filename : STRSPN.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: http://www.os2museum.com/wp/mtswslnk/