DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T s

⟦830be6948⟧ TextFile

    Length: 570 (0x23a)
    Types: TextFile
    Names: »strspn.c«

Derivation

└─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit
    └─⟦2fafebccf⟧ »EurOpenD3/mail/smail3.1.19.tar.Z« 
        └─⟦bcd2bc73f⟧ 
            └─⟦this⟧ »pd/strlib/strspn.c« 

TextFile

/* @(#)strspn.c	1.1 5/6/88 04:41:48 */
/*
 * 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;
}