welibc
A clear, secure, and well documented standard C library
Functions
strspn.c File Reference

Defines the strspn function. More...

#include <string.h>
Include dependency graph for strspn.c:

Go to the source code of this file.

Functions

size_t strspn (const char *s1, const char *s2)
 Find the length of the span of characters in s2 in s1. More...
 

Detailed Description

Defines the strspn function.

Definition in file strspn.c.

Function Documentation

◆ strspn()

size_t strspn ( const char *  s1,
const char *  s2 
)

Find the length of the span of characters in s2 in s1.

Parameters
*s1String being searched
*s2String of characters in the span being found

The strspn function computes the length of the maximum initial segment of the string pointed to by s1 which consists entirely of characters from the string pointed to by s2.

Returns
Length of the segment

Definition at line 52 of file strspn.c.

References strchr().

Referenced by strtok().

Here is the call graph for this function:
Here is the caller graph for this function: