strspn Function
Syntax:
size_t strspn(const char *str1, const char *str2);
Example:
#include <string.h> #include <stdio.h> int main() { int len; len = strspn("this is a test", "hi"); printf("%d", len); return 0; }Back
size_t strspn(const char *str1, const char *str2);
#include <string.h> #include <stdio.h> int main() { int len; len = strspn("this is a test", "hi"); printf("%d", len); return 0; }Back