2021-12-19 08:35:56 +00:00
|
|
|
// This is test program for strcspn function from string.h
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
char s1[] = "HELLO, this won't be counted";
|
|
|
|
char s2[] = "ihst";
|
2021-12-24 14:19:51 +00:00
|
|
|
printf("%d\n", strcspn(s1, s2));
|
2021-12-19 08:35:56 +00:00
|
|
|
return 0;
|
|
|
|
}
|