strcspn

Find the first substring length.

size_t strcspn (char * string, char * charset);

Required Header
<string.h>

Return Value

The length of the substring which consists entirely of characters not in charset is returned.

Parameters

string

  A string

charset

  A set of characters not allowed in the substring

Remarks

The return value can be used as in index to the first character in charset.

String

See Also    strchr, strncmp, strncpy, strspn