#include <string.h>
|
size_t
strspn (const char *s, const char *charset); |
strspn function returns the number of characters in the initial segment of s which consists only of characters from accept
#include <string.h> #include <stdio.h> int main() { char one[50]; int res; strcpy(one,"abcba"); res = strspn(one, "abc"); printf(" %d times characters found in the string \n",res); return 0; }
Output
5 times characters found in the string
© 2005-2007 Nokia |