Computes the length of a string consisting of characters not from a given set.
#include <string.h> size_t strcspn ( const char *str, const char *charset);
(IN) Points to a null-terminated string to scan.
(IN) Points to a null-terminated set of characters to exclude from the length.
Returns the length of the computed string segment.
The strcspn function computes the length of the initial segment of the string pointed to by str, which consists entirely of characters not from the string pointed to by charset. The null-terminating character is not considered part of str.