C / string.h / strspn
memchr, memcmp, memcpy, memmove, memset, strcat, strchr, strcmp, strcoll, strcpy, strcspn, strerror, strlen, strncat, strncmp, strncpy, strpbrk, strrchr, » strspn, strstr, strtok, strxfrm,
Funcion: strspn()
Sintaxis:
size_t strspn(const char *s1, const char *s2);

Descripcion: Calcula el número de caracteres de una subcadena inicial apuntada por s1 que consiste en todos los caracteres formados en la cadena apuntada por s2.


Ejemplo:
#include <stdio.h>
#include <string.h>
 
int main()
{
   char s1[13] = "Hola a todos";
   char s2[5] = "Hola";
 
   printf( "s1=%s\n", s1 );
   printf( "s2=%s\n", s2 );
   printf( "strspn(s1,s2) = %d\n", strspn( s1, s2 ) );
 
   return 0;
}

Librerias C

Librerias ANSI C
   string.hcstring
   math.hcmath
   stdio.hcstdio
   time.hctime
   stdlib.hcstdlib
   ctype.hcctype
   locale.hclocale
   signal.hcsignal
   setjmp.hcsetjmp

Librerias Borland
   conio.h
   graphics.h