Tutorialspoint

strspn() in C language

#include <stdio.h>
#include<string.h>
int main() {
   const char s1[] = "Helloworld!";
   const char s2[] = "Hello";
   int length = strspn(s1, s2);
   printf("The length of string : %d", length);
   return 0;
}

Advertisements
Loading...