strspn()

Syntax
  #include <string.h>

  
  size_t strspn(const char *p, const char *q);

  
Description

strspn() returns the length of the initial part of p that contains only characters also appearing in q.

Return

The position of the first character in p that is not in q.

See also

strchr(),

strcspn(),

strpbrk(), and

strrchr()