Get length of substring composed of given characters
#include <string.h> #include <stdio.h> int main(void) { int len; len = strspn("this is a test", "siht "); printf("%d", len); return 0; }