span the complement of a string

You're viewing an older version of this page (#3281). View the current version.

View versions (3)

NAME

<span class="Nm" id="strcspn">strcspn</span>

INTERFACE

#include <string.h> size_t strcspn ( const char *s, const char *charset )

DESCRIPTION

The strcspn function spans the initial part of the null-terminated string &#92;c s as long as the characters from &#92;c s do not occur in string &#92;c charset (it spans the <span class="Em">complement</span> of &#92;c charset).

RETURN VALUES

The strcspn function returns the number of characters spanned.

SEE ALSO

memchr (3) , strchr (3) , strpbrk (3) , strrchr (3) , reference:strsep (3) , strspn (3) , strstr (3) , strtok (3)

STANDARDS

The strcspn function conforms to