#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
© 2007-2009 Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user. |
|