Go to the first, previous, next, last section, table of contents.


strspn

Syntax

#include <string.h>

size_t strspn(const char *s1, const char *set);

Description

This function finds the first character in s1 that does not match any character in set. Note that the NULL bytes at the end of s1 counts, so you'll at least get a pointer to the end of the string if nothing else.

Return Value

The index of the found character.

Portability

ANSI, POSIX

Example

int i = strspn(entry, " \t\b");
if (entry[i])
  do_something();


Go to the first, previous, next, last section, table of contents.