strcspn()

Syntax
  #include <string.h>

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

  
Description

strcspn() searches p for the first character that also appears in q.

Return

The length of the initial segment of p that contains only characters not in q.

See also

strchr(),

strpbrk(),

strrchr(), and

strspn()