Name

strcspn function — Counts initial characters not in a span set

Synopsis

size_t strcspn(const char* str, const char* spanset)

The strcspn function returns the number of characters at the start of str that are not in the string spanset. Thus, the c in its name means complement, that is, strcspn counts characters that are in the complement of the span set.